Uh oh!
There was an error while loading. Please reload this page.
[ENHANCEMENT] Use the official types in the blueprints - #10506
Conversation
Windvis
commented
Sep 27, 2024
I also found this open PR which is somewhat related: #10270 Do we also want to add some type import comments for the js users? |
This comment was marked as outdated.
This comment was marked as outdated.
This matches the sorting of npm, so nothing is moved around after installing new packages.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kategengler
commented
Sep 30, 2024
Thank you! |
FYI, I tested a similar setup (based on v5.3.8) in one of our projects but it complained about the paths in the tsconfig file. We need to prefix the EmberData packages with "types": [
"./node_modules/@ember-data-types/adapter/unstable-preview-types",
"./node_modules/@ember-data-types/graph/unstable-preview-types",
"./node_modules/@ember-data-types/json-api/unstable-preview-types",
"./node_modules/@ember-data-types/legacy-compat/unstable-preview-types",
"./node_modules/@ember-data-types/model/unstable-preview-types",
"./node_modules/@ember-data-types/request-utils/unstable-preview-types",
"./node_modules/@ember-data-types/request/unstable-preview-types",
"./node_modules/@ember-data-types/serializer/unstable-preview-types",
"./node_modules/@ember-data-types/store/unstable-preview-types",
"./node_modules/@ember-data-types/tracking/unstable-preview-types",
"./node_modules/@warp-drive-types/core-types/unstable-preview-types",
"./node_modules/ember-data-types/unstable-preview-types",
"ember-source/types"
]I need to double check if v5.4.0.beta-11 has the same issue and I simply missed it here. What is strange is that the In any case, this potentially needs a follow up PR if the current setup isn't working out of the box. Edit: it seems the issue is that the ember-data packages have an "exports" config but they don't include rules for type imports. This is by design, since the types are still unstable, but it does seem to influence the way the Once we add the |
| "@ember-data/request/unstable-preview-types", | ||
| "@ember-data/request-utils/unstable-preview-types", | ||
| "@ember-data/model/unstable-preview-types", | ||
| "@ember-data/serializer//unstable-preview-types", |
This updates the TS blueprints to use the official types instead of the outdated DT types.
Supersedes #10461 and #10270