Dynamic Import of gts Components with Extension Returns Type 'any'
**Issue**
When dynamically importing a template tag component with the .gts extension, the type comes back as "any", breaking `@typescript-eslint/no-unsafe-assignment` with message "Unsafe assignment of an `any` value"
**Example**
Does NOT work:
```
const component = await import('./dynamic.gts');
```
Does work:
```
const component = await import('./dynamic');
```
**Versions**
Ember: 6.11
@glint/ember-tsc: 1.1.1
@glint/tsserver-plugin: 2.1.0
**Reproduction (created from [app-blueprint](https://github.com/ember-cli/ember-app-blueprint/tree/main) )**
https://github.com/kdagnan/glint-dynamic-import-extensions-bug
Look at `components/import.gts`
I don't think this is a huge deal, but we're trying to be better about including extensions in our imports. From what I can tell, this is only an issue with .gts component *dynamic* imports. Regular import statements at the top of the file are fine.
关闭于 2026-03-12 2 条评论