Skip to content

Commit

Permalink
Expose TInsertType of the Table interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 authored and dfahlander committed Jan 18, 2024
1 parent 3192c59 commit c94e9e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/public/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export { UpdateSpec } from './types/update-spec';
export * from './types/insert-type';

// Alias of Table and Collection in order to be able to refer them from module below...
interface _Table<T, TKey> extends Table<T, TKey> {}
interface _Table<T, TKey, TInsertType> extends Table<T, TKey, TInsertType> {}
interface _Collection<T,TKey> extends Collection<T,TKey> {}

// Besides being the only exported value, let Dexie also be
Expand All @@ -41,7 +41,7 @@ declare module Dexie {
// The "Dexie.Promise" type.
type Promise<T=any> = PromiseExtended<T> // Because many samples have been Dexie.Promise.
// The "Dexie.Table" interface. Same as named exported interface Table.
interface Table<T=any,Key=any> extends _Table<T,Key> {} // Because all samples have been Dexie.Table<...>
interface Table<T=any,Key=any,TInsertType=T> extends _Table<T,Key,TInsertType> {} // Because all samples have been Dexie.Table<...>
// The "Dexie.Collection" interface. Same as named exported interface Collection.
interface Collection<T=any,Key=any> extends _Collection<T, Key> {} // Because app-code may declare it.
}
Expand Down

0 comments on commit c94e9e8

Please sign in to comment.