Open richtera opened 8 years ago
I got further. Calling compileString doesn't really do anything if there are errors (I had assumed it would throw errors when onError was not defined.) After seeing the first errors I realized that I needed a command line to be passed for this to do anything. Now I have:
const js = tsc.compileString(src, '--project ./tsconfig.json --module commonjs --target es5',
null, err => {
console.log("error", err);
});
This will work for simple typescript sources but no matter what I do I was unable to get it to understand decorators. Is there something else I have to do? I am also confused about command line versus compiler options versus --project settings. They seems to override each other in unexpected ways.
It gives me a strange error as if it had conversion problems and converted the StringSource to an object.
I get this weird error with the codeframe all messed up:
Not sure where to start, sorry.