У меня есть функция TypeScript в простом тексте. Как мне выполнить это в приложении JavaScript?let ts_text = `function add_five(num: number): number {
let other_num: number = 5;
return num + other_num;
}`;
let func = // make the function somehow
func(5); // 10
Подробнее здесь: https://stackoverflow.com/questions/793 ... pplication