Skip to content

Commit 9983727

Browse files
committed
Merge pull request #5982 from zhengbli/updateLib
Weekly update of lib.d.ts ported from TSJS repo
2 parents fbb9086 + da009c5 commit 9983727

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

src/lib/dom.generated.d.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6923,7 +6923,7 @@ interface IDBDatabase extends EventTarget {
69236923
onerror: (ev: Event) => any;
69246924
version: string;
69256925
close(): void;
6926-
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
6926+
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
69276927
deleteObjectStore(name: string): void;
69286928
transaction(storeNames: any, mode?: string): IDBTransaction;
69296929
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
@@ -6948,10 +6948,11 @@ declare var IDBFactory: {
69486948
}
69496949

69506950
interface IDBIndex {
6951-
keyPath: string;
6951+
keyPath: string | string[];
69526952
name: string;
69536953
objectStore: IDBObjectStore;
69546954
unique: boolean;
6955+
multiEntry: boolean;
69556956
count(key?: any): IDBRequest;
69566957
get(key: any): IDBRequest;
69576958
getKey(key: any): IDBRequest;
@@ -6988,7 +6989,7 @@ interface IDBObjectStore {
69886989
add(value: any, key?: any): IDBRequest;
69896990
clear(): IDBRequest;
69906991
count(key?: any): IDBRequest;
6991-
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
6992+
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
69926993
delete(key: any): IDBRequest;
69936994
deleteIndex(indexName: string): void;
69946995
get(key: any): IDBRequest;
@@ -12575,6 +12576,16 @@ interface XMLHttpRequestEventTarget {
1257512576
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1257612577
}
1257712578

12579+
interface IDBObjectStoreParameters {
12580+
keyPath?: string | string[];
12581+
autoIncrement?: boolean;
12582+
}
12583+
12584+
interface IDBIndexParameters {
12585+
unique?: boolean;
12586+
multiEntry?: boolean;
12587+
}
12588+
1257812589
interface NodeListOf<TNode extends Node> extends NodeList {
1257912590
length: number;
1258012591
item(index: number): TNode;
@@ -12610,6 +12621,15 @@ interface ProgressEventInit extends EventInit {
1261012621
total?: number;
1261112622
}
1261212623

12624+
interface HTMLTemplateElement extends HTMLElement {
12625+
content: DocumentFragment;
12626+
}
12627+
12628+
declare var HTMLTemplateElement: {
12629+
prototype: HTMLTemplateElement;
12630+
new(): HTMLTemplateElement;
12631+
}
12632+
1261312633
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
1261412634

1261512635
interface ErrorEventHandler {

src/lib/webworker.generated.d.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ interface IDBDatabase extends EventTarget {
311311
onerror: (ev: Event) => any;
312312
version: string;
313313
close(): void;
314-
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
314+
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
315315
deleteObjectStore(name: string): void;
316316
transaction(storeNames: any, mode?: string): IDBTransaction;
317317
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
@@ -336,10 +336,11 @@ declare var IDBFactory: {
336336
}
337337

338338
interface IDBIndex {
339-
keyPath: string;
339+
keyPath: string | string[];
340340
name: string;
341341
objectStore: IDBObjectStore;
342342
unique: boolean;
343+
multiEntry: boolean;
343344
count(key?: any): IDBRequest;
344345
get(key: any): IDBRequest;
345346
getKey(key: any): IDBRequest;
@@ -376,7 +377,7 @@ interface IDBObjectStore {
376377
add(value: any, key?: any): IDBRequest;
377378
clear(): IDBRequest;
378379
count(key?: any): IDBRequest;
379-
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
380+
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
380381
delete(key: any): IDBRequest;
381382
deleteIndex(indexName: string): void;
382383
get(key: any): IDBRequest;
@@ -892,6 +893,16 @@ interface WorkerUtils extends Object, WindowBase64 {
892893
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
893894
}
894895

896+
interface IDBObjectStoreParameters {
897+
keyPath?: string | string[];
898+
autoIncrement?: boolean;
899+
}
900+
901+
interface IDBIndexParameters {
902+
unique?: boolean;
903+
multiEntry?: boolean;
904+
}
905+
895906
interface BlobPropertyBag {
896907
type?: string;
897908
endings?: string;

0 commit comments

Comments
 (0)