-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In 6.1-alpha, importing ember-source/types
doesn't work, but the types: [] method does
#20789
Comments
Shouldn't the |
correct -- and fwiw, ember-data has been having the same problem (for much longer) -- finding that their type declarations are only loaded via this So, I wonder if, in order to support It could be that we really do need this form of exports?: exports: {
"./*": {
"types": "....",
"default": "...."
}
} rather than the shorthand. |
Wouldn't an additional entry like
AFAIK, this is used if you don't have some "modern" value for |
FWIW, EmberData chooses to not publish the type I ran into that EmberData issue when integrating the official types in the blueprints: ember-cli/ember-cli#10506 (comment) I couldn't really find documentation about this in the TS docs, but it did seem that once an exports config is present, a types key needs to be in there for things to work without prefixing it with the actual path (which depends on your package manager, I guess). Discussion: https://discord.com/channels/480462759797063690/1290318997040005234/1290367110744379445 |
Fix here #20792 |
idk if this is just how TS is changing, but in one PR: NullVoxPopuli/limber#1864
I noticed that all of the
import 'ember-source/types'
lines no longer define the types of the ember-source modules.Now, I know the blueprint, and other ecosystems have been preferring types (in tsconfig.json#compilerOptions#types):
it's just a bit lengthy as this doesn't respect package.json#exports.
It is suspicious that changing the ember version caused the difference in behavior.
The text was updated successfully, but these errors were encountered: