Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dexie typings extendable by addons #398

Merged
merged 4 commits into from
Dec 16, 2016
Merged

Conversation

dfahlander
Copy link
Collaborator

In response to #213. Now it's possible to extend the dexie API from an addon.
I've implemented this with dexie-observable so far. Next step: dexie-syncable.

Added [Symbol.toStringTag] property to Promise.prototype (in js and d.ts).
Removed Promise.onuncatched from d.ts.
Added Promise.timeout in d.ts.
Dexie.Promise is now compatible with Promise interface in lib.es2015.promise.d.ts and lib.es2015.symbol.wellknown.d.ts.

Also:
* More strict checks of transaction modes.
* Correction of Dexie.waitFor() to use PromiseLike instead of Promise.
* Simplified the declaration of all methods that have a 'then-shortcut-callback' as its last argument such as Table.get(), Table.toArray() etc.
Implemented Dexie.d.ts so that addons can extend events and API with Typescript 2.1 (See #213).

Made a d.ts file for dexie-observable that does extend the dexie typings according to its API. Next step will be to implement d.ts also for dexie-syncable.
@dfahlander dfahlander merged commit c556f2f into master Dec 16, 2016
@dfahlander dfahlander deleted the temp/extendable-dts branch December 16, 2016 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant