Open NullVoxPopuli opened 9 months ago
Wondering, is allowArbitraryExtensions
may help us here? https://www.typescriptlang.org/tsconfig#allowArbitraryExtensions
Also, looks like we may have customConditions
https://www.typescriptlang.org/tsconfig#customConditions dynamically generated
Interesting part: {file basename}.d.{extension}.ts
- is proposed type definition for custom extensions, so, instead of having component.gts.d.ts
we may need to use component.d.gts.ts
@lifeart yeah, that sounds like a reasonable feature -- but we'd still need glint to to remove the extension during emitting.
So far, I've found it easiest, to work around the problem :( Not ideal, but I don't know what the correct fix is yet. Maybe it's what you link to!
Resolves https://github.com/typed-ember/glint/issues/628
See repro repo: https://stackblitz.com/edit/stackblitz-starters-g58nhp?file=examples%2Fts-addon-node16%2Fpackage.json,examples%2Fts-addon-node16%2Fsrc%2Findex.ts
pnpm build
declarations
directoriesUsing the patch from here: https://github.com/typed-ember/glint/issues/628#issuecomment-1805416937 (where TS would allow)
And the test from here: https://github.com/typed-ember/glint/pull/648/files#diff-a835cb215198fc0a50973a4ae3bf66eac5a4b0bc21293fa29fc70888d663f797
The downside to this approach is "what if" someone has a foo.gts.ts file (probably co-located with a foo.gts.hbs file) -- but like, realistically, this isn't a thing they can use unless they're going half-in on static component references.
Notes:
#
to differentiate from packages.Testing locally
The Glint Terminal
yarn
yarn build
glint-monorepo-test-utils
from@glint/core
s package.json's devDependenciesRepro Terminal
pnpm i
pnpm link ~/path/to/this/branch/of/glint
pnpm build
note that after every
pnpm link
, in order to work in the glint repo again, you'll need to re-run yarn, and un-delete theglint-monorepo-test-utils
package.