Gavant / glint-template-types

MIT License
18 stars 20 forks source link

Support verbatimModuleSyntax #87

Closed bendemboski closed 5 months ago

bendemboski commented 8 months ago

Currently if a consuming app enables the verbatimModuleSyntax typescript compiler option and ends up (indirectly) consuming utils/types.ts, compiling/glinting will produce the error:

../node_modules/@gavant/glint-template-types/utils/types.ts:2:10 - error TS1484: 'ExpandSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

2 import { ExpandSignature } from '@glimmer/component/-private/component';

This PR addresses this, and also makes it so that tests will catch such violations in the future.

It strikes me that it might make sense to make this package's typescript config use @tsconfig/ember so it more closely matches that of blueprint generated Ember apps/addons, but that's outside the scope of this PR.