ember-cli-typescript icon indicating copy to clipboard operation
ember-cli-typescript copied to clipboard

`noEmitOnError: true` doesn't jive well with JS addons with a type declarations file.

Open NullVoxPopuli opened this issue 5 years ago • 1 comments

Please paste the output of ember -v here

$ yarn ember -v
yarn run v1.22.4
$ C:\Users\Preston\Documents\Development\NullVoxPopuli\emberclear\packages\frontend\node_modules\.bin\ember -v
ember-cli: 3.17.0
node: 12.14.1
os: win32 x64
Done in 11.08s.

Please paste the output of tsc -v here

$ yarn tsc -v
yarn run v1.22.4
$ C:\Users\Preston\Documents\Development\NullVoxPopuli\emberclear\packages\frontend\node_modules\.bin\tsc -v
Version 3.7.5
Done in 0.71s.

Please paste the version of ember-cli-typescript and ember-cli-typescript-blueprints here

$ yarn list --pattern ember-cli-typescript
yarn list v1.22.4
├─ @glimmer/[email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
├─ [email protected]
│  └─ [email protected]
├─ [email protected]
│  └─ [email protected]
└─ [email protected]
   └─ [email protected]
Done in 1.03

Please paste your tsconfig.json and tslint.json or eslint.json (if applicable) below

My tsconfig.json

{ "compilerOptions": { "target": "ESNext", "allowJs": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, "noImplicitAny": true, "noImplicitThis": true, "alwaysStrict": true, "strictNullChecks": true, "strictPropertyInitialization": true, "noUnusedParameters": true, "noImplicitReturns": false, // unfortunately, noEmitOnError: true doesn't work well with linked TS addons :( // (or at least, linked JS addons with a TS declarations file....) "noEmitOnError": false, "noEmit": true, "inlineSourceMap": true, "inlineSources": true, "baseUrl": ".", "module": "esnext", "experimentalDecorators": true, "esModuleInterop": true, "noFallthroughCasesInSwitch": true, "paths": { "emberclear/tests/": [ "tests/" ], "emberclear/config/": [ "config/" ], "emberclear/": [ "app/" ], "": [ "types/" ] } }, "include": [ "app//*", "tests//", "types/**/" ] }

What are instructions we can follow to reproduce the issue?

# have JS Addon
# JS Addon defines index.d.ts
# install addon via gitref syntax in your app's package.json
# example:
#       "ember-statecharts": "NullVoxpopuli/ember-statecharts#use-machine",
#        NOTE: this addon does not have ember-cli-typescript in its package.json
#
# run `yarn link` in the addon
# run `yarn link ember-statecharts` (or whatever the addon name is) within your app
# app now has type errors?

NullVoxPopuli avatar May 07 '20 02:05 NullVoxPopuli

Thanks for the report. Will try to dig into this a bit in June!

chriskrycho avatar May 21 '20 01:05 chriskrycho

I don't think this report has anything to do with ember-cli-typescript, but rather with the original approach being taken here and how it works with TS itself. Also it's been 3 years. Closing it!

chriskrycho avatar Sep 28 '23 23:09 chriskrycho