You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is correct. The transpile AP, is just for transpilation, I.e. generating JavaScript from typescript code. This only works on a single file, and does not load any files other than the ones needed.
Type checking is done as part of a full program compilation. You can use the ts.createProgram API for that.
ts.transpile is the correct entry point. we are looking of slimming it down. for the short term it still needs the checker code, but in the future it should be possible to do it with just the parser and the emitter, which is much smaller.
In other words: is .transpile() now the smaller version or still the same?
it still needs the code in the checker. no errors are reported, no files are loaded. the comment was mainly about the internals of the API call, and is not related to this question.
TypeScript Version:
1.8.5
Code
Compiler Invocation
Using typescriptServices.js:
ts.transpile(source, null, filename)
Expected behavior:
Type error
Actual behavior:
Code compiles successfully and produces the output:
The text was updated successfully, but these errors were encountered: