typescript 5.8.2 → 5.9.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -377,13 +377,13 @@ interface WEBGL_draw_buffers {
377
377
 
378
378
  interface WEBGL_multi_draw {
379
379
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */
380
- multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
380
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
381
381
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */
382
- multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
382
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
383
383
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */
384
- multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
384
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
385
385
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */
386
- multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
386
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
387
387
  }
388
388
 
389
389
  interface WebGL2RenderingContextBase {
@@ -269,7 +269,7 @@ interface String {
269
269
  }
270
270
 
271
271
  interface ArrayBuffer {
272
- readonly [Symbol.toStringTag]: string;
272
+ readonly [Symbol.toStringTag]: "ArrayBuffer";
273
273
  }
274
274
 
275
275
  interface DataView<TArrayBuffer extends ArrayBufferLike> {
@@ -29,13 +29,13 @@ interface SharedArrayBuffer {
29
29
  * Returns a section of an SharedArrayBuffer.
30
30
  */
31
31
  slice(begin?: number, end?: number): SharedArrayBuffer;
32
- readonly [Symbol.species]: SharedArrayBuffer;
33
32
  readonly [Symbol.toStringTag]: "SharedArrayBuffer";
34
33
  }
35
34
 
36
35
  interface SharedArrayBufferConstructor {
37
36
  readonly prototype: SharedArrayBuffer;
38
37
  new (byteLength?: number): SharedArrayBuffer;
38
+ readonly [Symbol.species]: SharedArrayBufferConstructor;
39
39
  }
40
40
  declare var SharedArrayBuffer: SharedArrayBufferConstructor;
41
41
 
@@ -29,15 +29,27 @@ declare namespace Intl {
29
29
  granularity?: "grapheme" | "word" | "sentence" | undefined;
30
30
  }
31
31
 
32
+ /**
33
+ * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
34
+ *
35
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
36
+ */
32
37
  interface Segmenter {
33
38
  /**
34
39
  * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
35
40
  *
41
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment)
42
+ *
36
43
  * @param input - The text to be segmented as a `string`.
37
44
  *
38
45
  * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
39
46
  */
40
47
  segment(input: string): Segments;
48
+ /**
49
+ * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object.
50
+ *
51
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions)
52
+ */
41
53
  resolvedOptions(): ResolvedSegmenterOptions;
42
54
  }
43
55
 
@@ -50,13 +62,20 @@ declare namespace Intl {
50
62
  [Symbol.iterator](): SegmentIterator<T>;
51
63
  }
52
64
 
65
+ /**
66
+ * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object.
67
+ *
68
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments)
69
+ */
53
70
  interface Segments {
54
71
  /**
55
72
  * Returns an object describing the segment in the original string that includes the code unit at a specified index.
56
73
  *
74
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing)
75
+ *
57
76
  * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
58
77
  */
59
- containing(codeUnitIndex?: number): SegmentData;
78
+ containing(codeUnitIndex?: number): SegmentData | undefined;
60
79
 
61
80
  /** Returns an iterator to iterate over the segments. */
62
81
  [Symbol.iterator](): SegmentIterator<SegmentData>;
@@ -76,6 +95,11 @@ declare namespace Intl {
76
95
  isWordLike?: boolean;
77
96
  }
78
97
 
98
+ /**
99
+ * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
100
+ *
101
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
102
+ */
79
103
  const Segmenter: {
80
104
  prototype: Segmenter;
81
105
 
package/lib/lib.es5.d.ts CHANGED
@@ -1158,6 +1158,7 @@ interface JSON {
1158
1158
  * @param text A valid JSON string.
1159
1159
  * @param reviver A function that transforms the results. This function is called for each member of the object.
1160
1160
  * If a member contains nested objects, the nested objects are transformed before the parent object is.
1161
+ * @throws {SyntaxError} If `text` is not valid JSON.
1161
1162
  */
1162
1163
  parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
1163
1164
  /**
@@ -1165,6 +1166,7 @@ interface JSON {
1165
1166
  * @param value A JavaScript value, usually an object or array, to be converted.
1166
1167
  * @param replacer A function that transforms the results.
1167
1168
  * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1169
+ * @throws {TypeError} If a circular reference or a BigInt value is found.
1168
1170
  */
1169
1171
  stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
1170
1172
  /**
@@ -1172,6 +1174,7 @@ interface JSON {
1172
1174
  * @param value A JavaScript value, usually an object or array, to be converted.
1173
1175
  * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
1174
1176
  * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1177
+ * @throws {TypeError} If a circular reference or a BigInt value is found.
1175
1178
  */
1176
1179
  stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
1177
1180
  }
@@ -25,3 +25,5 @@ and limitations under the License.
25
25
  /// <reference lib="esnext.iterator" />
26
26
  /// <reference lib="esnext.promise" />
27
27
  /// <reference lib="esnext.float16" />
28
+ /// <reference lib="esnext.error" />
29
+ /// <reference lib="esnext.sharedmemory" />
@@ -0,0 +1,24 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ interface ErrorConstructor {
20
+ /**
21
+ * Indicates whether the argument provided is a built-in Error instance or not.
22
+ */
23
+ isError(error: unknown): error is Error;
24
+ }
@@ -0,0 +1,25 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ interface Atomics {
20
+ /**
21
+ * Performs a finite-time microwait by signaling to the operating system or
22
+ * CPU that the current executing code is in a spin-wait loop.
23
+ */
24
+ pause(n?: number): void;
25
+ }