Skip to content

Commit 692988e

Browse files
Update TypeScript to 4.8.2
1 parent 91ce22b commit 692988e

37 files changed

+51390
-27853
lines changed

tsserver/cs/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/de/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/es/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/fr/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/it/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/ja/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/ko/diagnosticMessages.generated.json

Lines changed: 32 additions & 3 deletions
Large diffs are not rendered by default.

tsserver/lib.dom.d.ts

Lines changed: 130 additions & 185 deletions
Large diffs are not rendered by default.

tsserver/lib.dom.iterable.d.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ interface Headers {
121121

122122
interface IDBDatabase {
123123
/** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
124-
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
124+
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
125125
}
126126

127127
interface IDBObjectStore {
@@ -133,16 +133,6 @@ interface IDBObjectStore {
133133
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
134134
}
135135

136-
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
137-
}
138-
139-
interface MIDIOutput {
140-
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
141-
}
142-
143-
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
144-
}
145-
146136
interface MediaKeyStatusMap {
147137
[Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
148138
entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;

tsserver/lib.es2015.collection.d.ts

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,38 @@ and limitations under the License.
1919

2020

2121
interface Map<K, V> {
22+
2223
clear(): void;
24+
/**
25+
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
26+
*/
2327
delete(key: K): boolean;
28+
/**
29+
* Executes a provided function once per each key/value pair in the Map, in insertion order.
30+
*/
2431
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
32+
/**
33+
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
34+
* @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
35+
*/
2536
get(key: K): V | undefined;
37+
/**
38+
* @returns boolean indicating whether an element with the specified key exists or not.
39+
*/
2640
has(key: K): boolean;
41+
/**
42+
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
43+
*/
2744
set(key: K, value: V): this;
45+
/**
46+
* @returns the number of elements in the Map.
47+
*/
2848
readonly size: number;
2949
}
3050

3151
interface MapConstructor {
3252
new(): Map<any, any>;
33-
new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
53+
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
3454
readonly prototype: Map<any, any>;
3555
}
3656
declare var Map: MapConstructor;
@@ -43,9 +63,23 @@ interface ReadonlyMap<K, V> {
4363
}
4464

4565
interface WeakMap<K extends object, V> {
66+
/**
67+
* Removes the specified element from the WeakMap.
68+
* @returns true if the element was successfully removed, or false if it was not present.
69+
*/
4670
delete(key: K): boolean;
71+
/**
72+
* @returns a specified element.
73+
*/
4774
get(key: K): V | undefined;
75+
/**
76+
* @returns a boolean indicating whether an element with the specified key exists or not.
77+
*/
4878
has(key: K): boolean;
79+
/**
80+
* Adds a new element with a specified key and value.
81+
* @param key Must be an object.
82+
*/
4983
set(key: K, value: V): this;
5084
}
5185

@@ -56,11 +90,28 @@ interface WeakMapConstructor {
5690
declare var WeakMap: WeakMapConstructor;
5791

5892
interface Set<T> {
93+
/**
94+
* Appends a new element with a specified value to the end of the Set.
95+
*/
5996
add(value: T): this;
97+
6098
clear(): void;
99+
/**
100+
* Removes a specified value from the Set.
101+
* @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
102+
*/
61103
delete(value: T): boolean;
104+
/**
105+
* Executes a provided function once per each value in the Set object, in insertion order.
106+
*/
62107
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
108+
/**
109+
* @returns a boolean indicating whether an element with the specified value exists in the Set or not.
110+
*/
63111
has(value: T): boolean;
112+
/**
113+
* @returns the number of (unique) elements in Set.
114+
*/
64115
readonly size: number;
65116
}
66117

@@ -77,8 +128,18 @@ interface ReadonlySet<T> {
77128
}
78129

79130
interface WeakSet<T extends object> {
131+
/**
132+
* Appends a new object to the end of the WeakSet.
133+
*/
80134
add(value: T): this;
135+
/**
136+
* Removes the specified element from the WeakSet.
137+
* @returns Returns true if the element existed and has been removed, or false if the element does not exist.
138+
*/
81139
delete(value: T): boolean;
140+
/**
141+
* @returns a boolean indicating whether an object exists in the WeakSet or not.
142+
*/
82143
has(value: T): boolean;
83144
}
84145

0 commit comments

Comments
 (0)