Skip to content

Commit 47f389a

Browse files
committed
Merge pull request #51 from falsandtru/indexeddb
Update IndexedDB interfaces
2 parents 2780426 + 51a8127 commit 47f389a

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

baselines/dom.generated.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6894,7 +6894,7 @@ interface IDBCursor {
68946894
direction: string;
68956895
key: any;
68966896
primaryKey: any;
6897-
source: any;
6897+
source: IDBObjectStore | IDBIndex;
68986898
advance(count: number): void;
68996899
continue(key?: any): void;
69006900
delete(): IDBRequest;
@@ -6932,7 +6932,7 @@ interface IDBDatabase extends EventTarget {
69326932
close(): void;
69336933
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
69346934
deleteObjectStore(name: string): void;
6935-
transaction(storeNames: any, mode?: string): IDBTransaction;
6935+
transaction(storeNames: string | string[], mode?: string): IDBTransaction;
69366936
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
69376937
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
69386938
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@@ -6990,9 +6990,10 @@ declare var IDBKeyRange: {
69906990

69916991
interface IDBObjectStore {
69926992
indexNames: DOMStringList;
6993-
keyPath: string;
6993+
keyPath: string | string[];
69946994
name: string;
69956995
transaction: IDBTransaction;
6996+
autoIncrement: boolean;
69966997
add(value: any, key?: any): IDBRequest;
69976998
clear(): IDBRequest;
69986999
count(key?: any): IDBRequest;
@@ -7031,7 +7032,7 @@ interface IDBRequest extends EventTarget {
70317032
onsuccess: (ev: Event) => any;
70327033
readyState: string;
70337034
result: any;
7034-
source: any;
7035+
source: IDBObjectStore | IDBIndex | IDBCursor;
70357036
transaction: IDBTransaction;
70367037
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
70377038
addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;

baselines/webworker.generated.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ interface IDBCursor {
275275
direction: string;
276276
key: any;
277277
primaryKey: any;
278-
source: any;
278+
source: IDBObjectStore | IDBIndex;
279279
advance(count: number): void;
280280
continue(key?: any): void;
281281
delete(): IDBRequest;
@@ -313,7 +313,7 @@ interface IDBDatabase extends EventTarget {
313313
close(): void;
314314
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
315315
deleteObjectStore(name: string): void;
316-
transaction(storeNames: any, mode?: string): IDBTransaction;
316+
transaction(storeNames: string | string[], mode?: string): IDBTransaction;
317317
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
318318
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
319319
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@@ -371,9 +371,10 @@ declare var IDBKeyRange: {
371371

372372
interface IDBObjectStore {
373373
indexNames: DOMStringList;
374-
keyPath: string;
374+
keyPath: string | string[];
375375
name: string;
376376
transaction: IDBTransaction;
377+
autoIncrement: boolean;
377378
add(value: any, key?: any): IDBRequest;
378379
clear(): IDBRequest;
379380
count(key?: any): IDBRequest;
@@ -412,7 +413,7 @@ interface IDBRequest extends EventTarget {
412413
onsuccess: (ev: Event) => any;
413414
readyState: string;
414415
result: any;
415-
source: any;
416+
source: IDBObjectStore | IDBIndex | IDBCursor;
416417
transaction: IDBTransaction;
417418
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
418419
addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;

inputfiles/addedTypes.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@
361361
"name": "storageArea?",
362362
"type": "Storage"
363363
},
364+
{
365+
"kind": "property",
366+
"interface": "IDBObjectStore",
367+
"name": "autoIncrement",
368+
"type": "boolean"
369+
},
364370
{
365371
"kind": "interface",
366372
"name": "HTMLPictureElement",

inputfiles/overridingTypes.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,30 @@
320320
"new (type: string, eventInitDict?: StorageEventInit): StorageEvent"
321321
]
322322
},
323+
{
324+
"kind": "property",
325+
"interface": "IDBCursor",
326+
"name": "source",
327+
"type": "IDBObjectStore | IDBIndex"
328+
},
329+
{
330+
"kind": "method",
331+
"interface": "IDBDatabase",
332+
"name": "transaction",
333+
"signatures": ["transaction(storeNames: string | string[], mode?: string): IDBTransaction"]
334+
},
335+
{
336+
"kind": "property",
337+
"interface": "IDBObjectStore",
338+
"name": "keyPath",
339+
"type": "string | string[]"
340+
},
341+
{
342+
"kind": "property",
343+
"interface": "IDBRequest",
344+
"name": "source",
345+
"type": "IDBObjectStore | IDBIndex | IDBCursor"
346+
},
323347
{
324348
"kind": "method",
325349
"interface": "Window",

0 commit comments

Comments
 (0)