Closed make-github-pseudonymous-again closed 2 years ago
This is a good idea. I actually copy the IndexedDB types from lib.dom.ts
and include them. However, I'm not currently re-exporting the types in pony/polyfills, except minimally.
I'll give some thought to the best way to go about the export.
The copy of lib.dom.ts
is because indexeddbshim
does not export it's own types, but instead depends on TypeScript DOM built-ins.
Since DOM types aren't shipped by default by Deno, I cherry-pick the IndexedDB and related types, and I ship them here.
@make-github-pseudonymous-again Please take a look at branch https://github.com/aaronhuggins/indexeddb/tree/increase-api-surface
I think it does what you are asking for.
Yep!
Okay, I actually messed around quite a bit so that exports, IDE type hinting, and docs are all aligned.
Here's a link to Deno doc in the current repo: https://doc.deno.land/https://raw.githubusercontent.com/aaronhuggins/indexeddb/main/ponyfill.ts
Let me know what you think. I'll probably cut a release tomorrow.
That look perfect!
It's useful to have access to types and implementations of internals such as
IDBKeyRange
. Since types are meant to be generic, maybe it would make sense to have a separate package that mirrors theTypeScript
lib.dom.ts
definitions. For implementations, I think it makes sense to reexport whateverindexeddbshim
so that users of this library do not have to know where the implementations come from.