-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Labels
types:coreSomething is wrong with the Ember type definitionsSomething is wrong with the Ember type definitionstypes:core:dataSomething is wrong with the Ember Data type definitionsSomething is wrong with the Ember Data type definitions
Description
Which package(s) does this problem pertain to?
- @types/ember-data
What are instructions we can follow to reproduce the issue?
- install latest types
- try to use the
Snapshot.adapterOptions
as a record Property '<whatever you try to access>' does not exist on type '{}'.
Reproduction Case
import DS from 'ember-data';
function useOptions(snapshot: DS.Snapshot) {
let something = snapshot.adapterOptions.literallyAnything ?? {};
}
Now about that bug. What did you expect to see?
This should be typed as Record<string, unknown>
.
What happened instead?
It's typed as {}
and therefore goes 💥 when strict: true
is set.
Metadata
Metadata
Assignees
Labels
types:coreSomething is wrong with the Ember type definitionsSomething is wrong with the Ember type definitionstypes:core:dataSomething is wrong with the Ember Data type definitionsSomething is wrong with the Ember Data type definitions