Which package(s) does this problem pertain to?
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.
Which package(s) does this problem pertain to?
What are instructions we can follow to reproduce the issue?
Snapshot.adapterOptionsas a recordProperty '<whatever you try to access>' does not exist on type '{}'.Reproduction Case
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 💥 whenstrict: trueis set.