-
Notifications
You must be signed in to change notification settings - Fork 12
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
Types not working on "ember-link": "^3.0.0", #777
Comments
Looks like the proper way to import it is: import type LinkManagerService from 'ember-link/dist/services/link-manager'; |
in your As of TS v4.7 you can use |
Oups, I only intended to comment. Let us know, if that works. |
@gossi Thank you. It did work. Btw, how do you ship types for this moduleResolution ( |
Using ember-link/ember-link/package.json Lines 23 to 33 in bb834b2
Which is the default case to export types (over |
This adds `./types/*` to the `exports` in `package.json`. I don't totally understand what this does but I ran into an issue when trying to import the `CssTransitionsRegistry` like in the README example for "TypeScript Usage" after configuring TypeScript to use `"bundler"` for `"moduleResolution"`. I enabled `"bundler"` `"moduleResolution"` after seeing a comment from @gossi suggesting that as a fix for another issue. Apparently `"bundler"` is also now set by the latest version of `@tsconfig/ember` and so others will likely run into this as well. This seems to also work when `"moduleResolution"` is not set to `"bundler"` but again, I'm not really sure what this is doing and/or why it's needed. References buschtoens/ember-link#777 (comment) https://github.com/tsconfig/bases/blob/53d80ed4a9ece800ffca9774c4e63cef3ce6ab38/bases/ember.json#L13
This adds `./types/*` to the `exports` in `package.json`. I don't totally understand what this does but I ran into an issue when trying to import the `CssTransitionsRegistry` like in the README example for "TypeScript Usage" after configuring TypeScript to use `"bundler"` for `"moduleResolution"`. I enabled `"bundler"` `"moduleResolution"` after seeing a comment from @gossi suggesting that as a fix for another issue. Apparently `"bundler"` is also now set by the latest version of `@tsconfig/ember` and so others will likely run into this as well. This seems to also work when `"moduleResolution"` is not set to `"bundler"` but again, I'm not really sure what this is doing and/or why it's needed. References buschtoens/ember-link#777 (comment) https://github.com/tsconfig/bases/blob/53d80ed4a9ece800ffca9774c4e63cef3ce6ab38/bases/ember.json#L13
Types are not working on
"ember-link": "^3.0.0",
Currently using:
"typescript": "5.1.6",
The text was updated successfully, but these errors were encountered: