Closed NotWoods closed 5 years ago
Feedback for #84
void feels like a weird type to use to represent an unknown schema. More notably, it makes casting very difficult:
void
const openPromise = wrap(request) as unknown as Promise<IDBPDatabase<DBTypes>>;
unknown is better suited for an unknown type, and lets you cast easily:
unknown
const openPromise = wrap(request) as Promise<IDBPDatabase<DBTypes>>;
unknown does not extend DBScehma so the various conditional types still work.
DBScehma
Brilliant, thank you!
Feedback for #84
void
feels like a weird type to use to represent an unknown schema. More notably, it makes casting very difficult:unknown
is better suited for an unknown type, and lets you cast easily:unknown
does not extendDBScehma
so the various conditional types still work.