Skip to content

Commit

Permalink
Return void instead of undefined (jakearchibald#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotWoods authored and jakearchibald committed Oct 9, 2019
1 parent a36e090 commit 12f14cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions build/esm/entry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export interface IDBPDatabase<DBTypes extends DBSchema | unknown = unknown> exte
*
* @param storeName Name of the store.
*/
clear(name: StoreNames<DBTypes>): Promise<undefined>;
clear(name: StoreNames<DBTypes>): Promise<void>;
/**
* Retrieves the number of records matching the given query in a store.
*
Expand Down Expand Up @@ -182,7 +182,7 @@ export interface IDBPDatabase<DBTypes extends DBSchema | unknown = unknown> exte
* @param storeName Name of the store.
* @param key
*/
delete<Name extends StoreNames<DBTypes>>(storeName: Name, key: StoreKey<DBTypes, Name> | IDBKeyRange): Promise<undefined>;
delete<Name extends StoreNames<DBTypes>>(storeName: Name, key: StoreKey<DBTypes, Name> | IDBKeyRange): Promise<void>;
/**
* Retrieves the value of the first record in a store matching the query.
*
Expand Down Expand Up @@ -306,7 +306,7 @@ export interface IDBPTransaction<DBTypes extends DBSchema | unknown = unknown, T
/**
* Promise for the completion of this transaction.
*/
readonly done: Promise<undefined>;
readonly done: Promise<void>;
/**
* The associated object store, if the transaction covers a single store, otherwise undefined.
*/
Expand Down Expand Up @@ -339,7 +339,7 @@ export interface IDBPObjectStore<DBTypes extends DBSchema | unknown = unknown, T
/**
* Deletes all records in store.
*/
clear(): Promise<undefined>;
clear(): Promise<void>;
/**
* Retrieves the number of records matching the given query.
*/
Expand All @@ -353,7 +353,7 @@ export interface IDBPObjectStore<DBTypes extends DBSchema | unknown = unknown, T
/**
* Deletes records in store matching the given query.
*/
delete(key: StoreKey<DBTypes, StoreName> | IDBKeyRange): Promise<undefined>;
delete(key: StoreKey<DBTypes, StoreName> | IDBKeyRange): Promise<void>;
/**
* Retrieves the value of the first record matching the query.
*
Expand Down Expand Up @@ -530,7 +530,7 @@ export interface IDBPCursor<DBTypes extends DBSchema | unknown = unknown, TxStor
/**
* Delete the current record.
*/
delete(): Promise<undefined>;
delete(): Promise<void>;
/**
* Updated the current record.
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export interface IDBPDatabase<DBTypes extends DBSchema | unknown = unknown>
*
* @param storeName Name of the store.
*/
clear(name: StoreNames<DBTypes>): Promise<undefined>;
clear(name: StoreNames<DBTypes>): Promise<void>;
/**
* Retrieves the number of records matching the given query in a store.
*
Expand Down Expand Up @@ -306,7 +306,7 @@ export interface IDBPDatabase<DBTypes extends DBSchema | unknown = unknown>
delete<Name extends StoreNames<DBTypes>>(
storeName: Name,
key: StoreKey<DBTypes, Name> | IDBKeyRange,
): Promise<undefined>;
): Promise<void>;
/**
* Retrieves the value of the first record in a store matching the query.
*
Expand Down Expand Up @@ -486,7 +486,7 @@ export interface IDBPTransaction<
/**
* Promise for the completion of this transaction.
*/
readonly done: Promise<undefined>;
readonly done: Promise<void>;
/**
* The associated object store, if the transaction covers a single store, otherwise undefined.
*/
Expand Down Expand Up @@ -550,7 +550,7 @@ export interface IDBPObjectStore<
/**
* Deletes all records in store.
*/
clear(): Promise<undefined>;
clear(): Promise<void>;
/**
* Retrieves the number of records matching the given query.
*/
Expand All @@ -568,7 +568,7 @@ export interface IDBPObjectStore<
/**
* Deletes records in store matching the given query.
*/
delete(key: StoreKey<DBTypes, StoreName> | IDBKeyRange): Promise<undefined>;
delete(key: StoreKey<DBTypes, StoreName> | IDBKeyRange): Promise<void>;
/**
* Retrieves the value of the first record matching the query.
*
Expand Down Expand Up @@ -848,7 +848,7 @@ export interface IDBPCursor<
/**
* Delete the current record.
*/
delete(): Promise<undefined>;
delete(): Promise<void>;
/**
* Updated the current record.
*/
Expand Down

0 comments on commit 12f14cb

Please sign in to comment.