Skip to content

Commit 789e957

Browse files
authored
Merge branch 'main' into fix-ternary-indentation
2 parents 289bd10 + d0d675a commit 789e957

File tree

87 files changed

+893
-779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+893
-779
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ const libEntries: [string, string][] = [
248248
["esnext.iterator", "lib.esnext.iterator.d.ts"],
249249
["esnext.promise", "lib.esnext.promise.d.ts"],
250250
["esnext.float16", "lib.esnext.float16.d.ts"],
251+
["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
251252
["esnext.error", "lib.esnext.error.d.ts"],
252253
["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
253254
["decorators", "lib.decorators.d.ts"],

src/compiler/utilities.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,12 @@ export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__
17831783
"toSpliced",
17841784
"with",
17851785
],
1786+
esnext: [
1787+
"toBase64",
1788+
"setFromBase64",
1789+
"toHex",
1790+
"setFromHex",
1791+
],
17861792
})),
17871793
Uint8ClampedArray: new Map(Object.entries({
17881794
es2022: [
@@ -1911,6 +1917,12 @@ export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__
19111917
"cause",
19121918
],
19131919
})),
1920+
Uint8ArrayConstructor: new Map(Object.entries({
1921+
esnext: [
1922+
"fromBase64",
1923+
"fromHex",
1924+
],
1925+
})),
19141926
}))
19151927
);
19161928

src/lib/dom.generated.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40739,10 +40739,10 @@ interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<
4073940739
}
4074040740

4074140741
interface FileSystemDirectoryHandle {
40742-
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
40743-
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
40742+
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
40743+
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
4074440744
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
40745-
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
40745+
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
4074640746
}
4074740747

4074840748
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {

src/lib/esnext.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/// <reference lib="esnext.float16" />
1010
/// <reference lib="esnext.error" />
1111
/// <reference lib="esnext.sharedmemory" />
12+
/// <reference lib="esnext.typedarrays" />

src/lib/esnext.typedarrays.d.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
2+
/**
3+
* Converts the `Uint8Array` to a base64-encoded string.
4+
* @param options If provided, sets the alphabet and padding behavior used.
5+
* @returns A base64-encoded string.
6+
*/
7+
toBase64(
8+
options?: {
9+
alphabet?: "base64" | "base64url" | undefined;
10+
omitPadding?: boolean | undefined;
11+
},
12+
): string;
13+
14+
/**
15+
* Sets the `Uint8Array` from a base64-encoded string.
16+
* @param string The base64-encoded string.
17+
* @param options If provided, specifies the alphabet and handling of the last chunk.
18+
* @returns An object containing the number of bytes read and written.
19+
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
20+
* chunk is inconsistent with the `lastChunkHandling` option.
21+
*/
22+
setFromBase64(
23+
string: string,
24+
options?: {
25+
alphabet?: "base64" | "base64url" | undefined;
26+
lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined;
27+
},
28+
): {
29+
read: number;
30+
written: number;
31+
};
32+
33+
/**
34+
* Converts the `Uint8Array` to a base16-encoded string.
35+
* @returns A base16-encoded string.
36+
*/
37+
toHex(): string;
38+
39+
/**
40+
* Sets the `Uint8Array` from a base16-encoded string.
41+
* @param string The base16-encoded string.
42+
* @returns An object containing the number of bytes read and written.
43+
*/
44+
setFromHex(string: string): {
45+
read: number;
46+
written: number;
47+
};
48+
}
49+
50+
interface Uint8ArrayConstructor {
51+
/**
52+
* Creates a new `Uint8Array` from a base64-encoded string.
53+
* @param string The base64-encoded string.
54+
* @param options If provided, specifies the alphabet and handling of the last chunk.
55+
* @returns A new `Uint8Array` instance.
56+
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
57+
* chunk is inconsistent with the `lastChunkHandling` option.
58+
*/
59+
fromBase64(
60+
string: string,
61+
options?: {
62+
alphabet?: "base64" | "base64url" | undefined;
63+
lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined;
64+
},
65+
): Uint8Array<ArrayBuffer>;
66+
67+
/**
68+
* Creates a new `Uint8Array` from a base16-encoded string.
69+
* @returns A new `Uint8Array` instance.
70+
*/
71+
fromHex(
72+
string: string,
73+
): Uint8Array<ArrayBuffer>;
74+
}

src/lib/libs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"esnext.iterator",
8888
"esnext.promise",
8989
"esnext.float16",
90+
"esnext.typedarrays",
9091
"esnext.error",
9192
"esnext.sharedmemory",
9293
"decorators",

src/lib/webworker.generated.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13736,10 +13736,10 @@ interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<
1373613736
}
1373713737

1373813738
interface FileSystemDirectoryHandle {
13739-
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
13740-
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
13739+
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
13740+
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>;
1374113741
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
13742-
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
13742+
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemDirectoryHandle | FileSystemFileHandle>;
1374313743
}
1374413744

1374513745
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {

tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=nodenext).trace.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,7 @@
193193
"File '/.ts/package.json' does not exist according to earlier cached lookups.",
194194
"File '/package.json' does not exist according to earlier cached lookups.",
195195
"File '/.ts/package.json' does not exist according to earlier cached lookups.",
196+
"File '/package.json' does not exist according to earlier cached lookups.",
197+
"File '/.ts/package.json' does not exist according to earlier cached lookups.",
196198
"File '/package.json' does not exist according to earlier cached lookups."
197199
]

tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)