Generally speaking TypeScript expects .js extensions for imports because the compiled output is .js. In the future TS might release a new feature allowing .ts extensions, but currently under NodeNext moduleResolution, .js is the way to go for files that actually compile to JS.
That said, in JSDocs annotated type-only imports we should use .d.ts extension because we only emit declaration files for these, so the compiled output is just .d.ts files.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: closes https://github.com/amzn/style-dictionary/issues/1371
Description of changes:
Generally speaking TypeScript expects .js extensions for imports because the compiled output is .js. In the future TS might release a new feature allowing .ts extensions, but currently under NodeNext moduleResolution, .js is the way to go for files that actually compile to JS.
That said, in JSDocs annotated type-only imports we should use .d.ts extension because we only emit declaration files for these, so the compiled output is just .d.ts files.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.