Open
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.