Is it possible to save my Typescript code in a string and evaulate it during run time? For simple example:
let code: string = `({
Run: (data: string): string => {
console.log(data); return Promise.resolve("SUCCESS"); }
})`;
Then run it like this:
let runnalbe = eval(code);
runnable.Run("RUN!").then((result:string)=>{console.log(result);});
Should print:
RUN!SUCCESS