Skip to content

Commit ff375bf

Browse files
authored
Merge pull request #630 from mikelehen/mikelehen/fix-indexeddb-types
Remove inappropriate IDBKeyRange usages from lib.dom.d.ts.
2 parents 79ee8de + dada3c3 commit ff375bf

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

baselines/dom.generated.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8858,12 +8858,12 @@ interface IDBCursor {
88588858
* Returns the key of the cursor.
88598859
* Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
88608860
*/
8861-
readonly key: IDBValidKey | IDBKeyRange;
8861+
readonly key: IDBValidKey;
88628862
/**
88638863
* Returns the effective key of the cursor.
88648864
* Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
88658865
*/
8866-
readonly primaryKey: IDBValidKey | IDBKeyRange;
8866+
readonly primaryKey: IDBValidKey;
88678867
/**
88688868
* Returns the IDBObjectStore or IDBIndex the cursor was opened from.
88698869
*/
@@ -8877,12 +8877,12 @@ interface IDBCursor {
88778877
* Advances the cursor to the next record in range matching or
88788878
* after key.
88798879
*/
8880-
continue(key?: IDBValidKey | IDBKeyRange): void;
8880+
continue(key?: IDBValidKey): void;
88818881
/**
88828882
* Advances the cursor to the next record in range matching
88838883
* or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.
88848884
*/
8885-
continuePrimaryKey(key: IDBValidKey | IDBKeyRange, primaryKey: IDBValidKey | IDBKeyRange): void;
8885+
continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
88868886
/**
88878887
* Delete the record pointed at by the cursor with a new value.
88888888
* If successful, request's result will be undefined.
@@ -9137,7 +9137,7 @@ interface IDBObjectStore {
91379137
* Returns the associated transaction.
91389138
*/
91399139
readonly transaction: IDBTransaction;
9140-
add(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>;
9140+
add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
91419141
/**
91429142
* Deletes all records in store.
91439143
* If successful, request's result will
@@ -9210,7 +9210,7 @@ interface IDBObjectStore {
92109210
* null if there were no matching records.
92119211
*/
92129212
openKeyCursor(query?: IDBValidKey | IDBKeyRange, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
9213-
put(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>;
9213+
put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
92149214
}
92159215

92169216
declare var IDBObjectStore: {

baselines/webworker.generated.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,12 +1428,12 @@ interface IDBCursor {
14281428
* Returns the key of the cursor.
14291429
* Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
14301430
*/
1431-
readonly key: IDBValidKey | IDBKeyRange;
1431+
readonly key: IDBValidKey;
14321432
/**
14331433
* Returns the effective key of the cursor.
14341434
* Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
14351435
*/
1436-
readonly primaryKey: IDBValidKey | IDBKeyRange;
1436+
readonly primaryKey: IDBValidKey;
14371437
/**
14381438
* Returns the IDBObjectStore or IDBIndex the cursor was opened from.
14391439
*/
@@ -1447,12 +1447,12 @@ interface IDBCursor {
14471447
* Advances the cursor to the next record in range matching or
14481448
* after key.
14491449
*/
1450-
continue(key?: IDBValidKey | IDBKeyRange): void;
1450+
continue(key?: IDBValidKey): void;
14511451
/**
14521452
* Advances the cursor to the next record in range matching
14531453
* or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.
14541454
*/
1455-
continuePrimaryKey(key: IDBValidKey | IDBKeyRange, primaryKey: IDBValidKey | IDBKeyRange): void;
1455+
continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
14561456
/**
14571457
* Delete the record pointed at by the cursor with a new value.
14581458
* If successful, request's result will be undefined.
@@ -1703,7 +1703,7 @@ interface IDBObjectStore {
17031703
* Returns the associated transaction.
17041704
*/
17051705
readonly transaction: IDBTransaction;
1706-
add(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>;
1706+
add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
17071707
/**
17081708
* Deletes all records in store.
17091709
* If successful, request's result will
@@ -1776,7 +1776,7 @@ interface IDBObjectStore {
17761776
* null if there were no matching records.
17771777
*/
17781778
openKeyCursor(query?: IDBValidKey | IDBKeyRange, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1779-
put(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>;
1779+
put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
17801780
}
17811781

17821782
declare var IDBObjectStore: {

inputfiles/overridingTypes.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@
711711
"add": {
712712
"name": "add",
713713
"override-signatures": [
714-
"add(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>"
714+
"add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>"
715715
]
716716
},
717717
"clear": {
@@ -735,7 +735,7 @@
735735
"put": {
736736
"name": "put",
737737
"override-signatures": [
738-
"put(value: any, key?: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey>"
738+
"put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>"
739739
]
740740
},
741741
"get": {
@@ -1268,11 +1268,11 @@
12681268
"property": {
12691269
"key": {
12701270
"name": "key",
1271-
"override-type": "IDBValidKey | IDBKeyRange"
1271+
"override-type": "IDBValidKey"
12721272
},
12731273
"primaryKey": {
12741274
"name": "primaryKey",
1275-
"override-type": "IDBValidKey | IDBKeyRange"
1275+
"override-type": "IDBValidKey"
12761276
}
12771277
}
12781278
},
@@ -1281,13 +1281,13 @@
12811281
"continue": {
12821282
"name": "continue",
12831283
"override-signatures": [
1284-
"continue(key?: IDBValidKey | IDBKeyRange): void"
1284+
"continue(key?: IDBValidKey): void"
12851285
]
12861286
},
12871287
"continuePrimaryKey": {
12881288
"name": "continuePrimaryKey",
12891289
"override-signatures": [
1290-
"continuePrimaryKey(key: IDBValidKey | IDBKeyRange, primaryKey: IDBValidKey | IDBKeyRange): void"
1290+
"continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void"
12911291
]
12921292
},
12931293
"delete": {

0 commit comments

Comments
 (0)