3.2.0 Missing `lookup` and `register` on `Owner` type definition
runspired opened this issue · 8 comments
Example errors:
tests/graph/tests/integration/graph/edge-test.ts(18,19): error TS2339: Property 'lookup' does not exist on type 'Owner'.
tests/graph/tests/integration/graph/edge-test.ts(37,13): error TS2339: Property 'register' does not exist on type 'Owner'.
I realized there is now an undeclared peer-dependency on @types/ember__owner
(or I suppose similar for preview types). Adding this resolved these issues for all but unregister
.
tests/main/tests/integration/record-data/record-data-state-test.ts(213,11): error TS2551: Property 'unregister' does not exist on type 'Owner'. Did you mean 'register'?
Side note for anyone encountering similar upgrade pains: I also discovered when removing the no longer needed legacy test types that these legacy test types had also brought @types/jquery
, we were missing this and didn't know.
full set of required changed we ended up needing to make is here emberjs/data#8630
this library uses the types from ember-source
: https://github.com/emberjs/ember-test-helpers/blob/master/addon/types/dummy/index.d.ts#L1
undeclared peer-dependency on @types/ember__owner
I don't think we want to add that, because the consumer can provide those types.
I could be wrong, but afaik, types are globally available (indexed on module name), and there is no per-package resolving of types, as there is with resolving package dependencies.
I don't think we want to add that, because the consumer can provide those types.
Seems like a missing pnpm feature for types-only peer-dependency ;)
this library uses the types from
ember-source
But it is supposed to be more broadly compatible and given no announcement of stable types from ember-source has been made (I notice in what you linked a claim that 5.1 has stable type now, but the release post makes no mention of this) I wouldn't have expected updating ember-test-helpers to have forced an upgrade of all types for Ember.
no announcement of stable types from ember-source
https://github.com/emberjs/ember.js/releases/tag/v5.1.0
https://github.com/ember-learn/ember-blog/pull/1284/files#diff-757a9c497b0a002ae5f535ef6d832c790890c454a56c56cb978294729a12b3ceR29
I don't have comments about the other stuff in your comment, because I don't have the context
Gonna closed this, as the issue is resolved in new projects.