embroider-build / addon-blueprint

Blueprint for v2-formatted Ember addons
MIT License
29 stars 27 forks source link

Because TS addons need to emit declarations, we need to set noEmit to false #277

Closed NullVoxPopuli closed 6 months ago

NullVoxPopuli commented 6 months ago

Originally opened in #271


if you add emitDeclarationOnly: true, you get silent fail, (exit 0), no declaration.

if you run tsc --decalaration to get debugging info on the config, you get this error:

❯ tsc --declaration
tsconfig.json:17:5 - error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'.

17     "emitDeclarationOnly": true,
       ~~~~~~~~~~~~~~~~~~~~~

Found 1 error in tsconfig.json:17

We are a bit at-odds with @tsconfig/ember, because it's designed for apps, and libraries just inherently have different needs.


To test locally:

❯ npx ember-cli@5.7 addon --blueprint ../OpenSource/emberjs/addon-blueprint --pnpm --typescript test-declaration-checking-and-generation