Open chriskrycho opened 3 years ago
Snapshot.adapterOptions
Property '<whatever you try to access>' does not exist on type '{}'.
import DS from 'ember-data'; function useOptions(snapshot: DS.Snapshot) { let something = snapshot.adapterOptions.literallyAnything ?? {}; }
This should be typed as Record<string, unknown>.
Record<string, unknown>
It's typed as {} and therefore goes 💥 when strict: true is set.
{}
strict: true
Should the adapterOptions property on SnapshotRecordArray be typed the same way? Currently it is also of type {}
adapterOptions
SnapshotRecordArray
This should be fixed by https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60742
Which package(s) does this problem pertain to?
What are instructions we can follow to reproduce the issue?
Snapshot.adapterOptions
as 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: true
is set.