tildeio / ember-element-helper

Dynamic element helper for Glimmer templates.
MIT License
44 stars 23 forks source link

Add typesVersions to package.json to make TS imports work #115

Closed SergeAstapov closed 11 months ago

SergeAstapov commented 11 months ago

without this fix, in https://github.com/ember-animation/ember-animated/pull/613 I have following error

[types] src/components/animated-container.ts:6:41 - error TS2307: Cannot find module 'ember-element-helper' or its corresponding type declarations.
[types] 
[types] 6 import type { ElementFromTagName } from 'ember-element-helper';
[types]                                           ~~~~~~~~~~~~~~~~~~~~~~
[types] 
[types] src/template-registry.ts:5:47 - error TS2307: Cannot find module 'ember-element-helper' or its corresponding type declarations.
[types] 
[types] 5 import type { element as ElementHelper } from 'ember-element-helper';
[types]                                                 ~~~~~~~~~~~~~~~~~~~~~~
NullVoxPopuli commented 11 months ago

This is good to add. More TS compatibility is good.

This happens though because the repo you linked is @tsconfig/ember@v2, which uses moduleResolution: node image

whereas @tsconfig/ember@v3 has bundler image