TS emit failed with latest release
The build works as expected, but when compilation on save is emited following error is triggered:
The build works as expected, but when compilation on save is emited following error is triggered:
Sorry @tomitrescak. I tried a quick test and it works fine.

Can you share your tsconfig.json ... and are you using extenalTranspiler? (I'm personally not and don't even have it setup) :rose:
Got it. Happens if the file is a .d.ts file ... aka doesn't have a valid js status
Released: https://github.com/TypeStrong/atom-typescript/releases/tag/v7.14.0 have a nice weekend :rose:
I admire your speeeeeeeeeeed :8ball: ;)
I suspect it's possible that the failures with d.ts files might be similar to the issue I'm chasing in #755. @tomitrescak (and @basarat ) when you were experiencing (and reproducing) this bug, were you compiling into your source directory? Or targeting a build directory distinct from your source directory? #755 popped up for me when I was looking at other babel-related code, as well. I will respond to @basarat's request for followup over in that thread now.
By the way, I totally get why reverting the babel thing makes sense for now. Those of us using babel can still use that commit until it's better sorted out. I think there are a few other issues with the babel integration that might as well all get packaged up together properly, rather than trying to piecemeal them as hotfixes to the babel support.
[EDIT] - Nevermind what is written below .. I had downgraded atom-typescript to previous version, therefore I had no errors. I will keep on investigating.
Hi, 7.14.1 is still failing Emit ;( Last one that works is 7.12.0 ;( I am not emiting files as per my tsconfig ... but I get the TS Emit failed message :/
"compileOnSave": true,
"compilerOptions": {
"target": "es6",
"declaration": false,
"noImplicitAny": true,
"removeComments": false,
"noLib": false,
"preserveConstEnums": true,
"noEmitHelpers": true,
"noEmit": true,
"suppressImplicitAnyIndexErrors": true,
"jsx": "preserve",
"experimentalDecorators": true,
"experimentalAsyncFunctions": true,
"sourceMap": true
},
"awesomeTypescriptLoaderOptions": {
"doTypeCheck": true,
"useBabel": false,
"emitRequireType": true,
"forkChecker": true
},
"filesGlob": [
"modules/**/*.ts",
"modules/**/*.tsx"
],
"files": [
...
],
"exclude": [
"node_modules"
],
"atom": {
"rewriteTsconfig": true
}
}
Hi, 7.14.1 is still failing Emit ;(
@tomitrescak I believe the stack trace would now be different. Can you share that please :rose:
Bad news ;( Stacktrace is empty .. no error in console. Only the TS failed to emit error.
ad news ;( Stacktrace is empty .. no error in console. Only the TS failed to emit error.
@tomitrescak I don't have a repro :-/ Also you seem to be the only one suffering from this at the moment. I am open to suggestions :rose:

@basarat GOT IT!
The culprit is the "noEmit": true
With compilation set to some outDir no problems appear.
When I turn on the noEmit rule in any of my projects I receive the TS Emit Failed.
I can reproduce this issue in ALL my projects, please test it if you have time.
The culprit is the "noEmit": true
Wouldn't noEmit explicitly disable any emit? So we shouldn't show the message but the rest is fine? Am I mistaken? :rose:
Yes, you are right. I'm not sure if on-the-fly compilation does the same as compilation on save, but the Emit Failed message should not be shown as it is a bit misleading since compilation is performed just fine.
@tomitrescak I've created a clearer issue report : https://github.com/TypeStrong/atom-typescript/issues/780 :rose:
@basarat I still get TS Emit failed when emit is set to false ;(
@tomitrescak the issue still exits : https://github.com/TypeStrong/atom-typescript/issues/780
I have difficulty wrapping my head around why one would even need noEmit : true? Surely something must be doing the emit and that thing is effectively ignoring the noEmit option. What is that thing? :rose:
My entire build process uses gulp-typescript and gulp-babel... including building the build itself -- so that no particular editor is needed, and so that we can control the streams, etc. etc. It also transpiles itself.
I always run with noEmit: true now.
(gulp-typescript happily, and correctly-for-its-use-case ignores the noEmit flag)
Cool so gulp-typescript ignores noEmit (https://www.npmjs.com/package/gulp-typescript#options). If all you want is just atom to ignore emit perhaps use compileOnSave: false as a workaround till the issue is fixed :rose:
Right -- difference being that the compile/buildOnSave settings prevent editor from assisting you in typechecking in-window.
I don't actually have an issue with noEmit anymore on my branch, so somewhere in there I think there's a fix (though maybe not an ideal one). I still need to deal with making that into a PR or PRs.
So, I don't need a workaround right now -- I was just chiming in with a reasoning behind wanting to run atom-typescript with noEmit turned on.
@basarat I am running Webpack with ts-loader which is responsible for loading typescript and creating sourcemaps. Thereofre I do not need emission. I need compile on save to have the possibility of typechecks and more.
I need compile on save to have the possibility of typechecks and more.
Typechecks are performed irrespective of compileOnSave (code https://github.com/TypeStrong/atom-typescript/blob/cdc8d9865a0abc8e6ca6bfb7d02e08dec675286e/lib/main/atom/onSaveHandler.ts#L31-L56). Correct me if I am wrong :rose: