Skip to content

Commit f801959

Browse files
authored
Fix missing typedarrays lib (#2695)
1 parent 1d3f7ae commit f801959

23 files changed

Lines changed: 36 additions & 73 deletions

internal/compiler/program_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ var esnextLibs = []string{
111111
"lib.esnext.decorators.d.ts",
112112
"lib.esnext.iterator.d.ts",
113113
"lib.esnext.float16.d.ts",
114+
"lib.esnext.typedarrays.d.ts",
114115
"lib.esnext.error.d.ts",
115116
"lib.esnext.sharedmemory.d.ts",
116117
"lib.decorators.d.ts",

internal/tsoptions/enummaps.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ var LibMap = collections.NewOrderedMapFromList([]collections.MapEntry[string, an
108108
{Key: "esnext.iterator", Value: "lib.esnext.iterator.d.ts"},
109109
{Key: "esnext.promise", Value: "lib.esnext.promise.d.ts"},
110110
{Key: "esnext.float16", Value: "lib.esnext.float16.d.ts"},
111+
{Key: "esnext.typedarrays", Value: "lib.esnext.typedarrays.d.ts"},
111112
{Key: "esnext.error", Value: "lib.esnext.error.d.ts"},
112113
{Key: "esnext.sharedmemory", Value: "lib.esnext.sharedmemory.d.ts"},
113114
{Key: "decorators", Value: "lib.decorators.d.ts"},

testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ new Int8Array().findLast((item) => item === 0);
2424

2525
new Uint8Array().findLast((item) => item === 0);
2626
>new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
27-
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more)
27+
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more)
2828
>findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --))
2929
>item : Symbol(item, Decl(findLast.ts, 3, 27))
3030
>item : Symbol(item, Decl(findLast.ts, 3, 27))
@@ -117,7 +117,7 @@ new Int8Array().findLastIndex((item) => item === 0);
117117

118118
new Uint8Array().findLastIndex((item) => item === 0);
119119
>new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
120-
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more)
120+
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more)
121121
>findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --))
122122
>item : Symbol(item, Decl(findLast.ts, 17, 32))
123123
>item : Symbol(item, Decl(findLast.ts, 17, 32))

testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols.diff

Lines changed: 0 additions & 20 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ new Int8Array().at(0);
1616

1717
new Uint8Array().at(0);
1818
>new Uint8Array().at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --))
19-
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more)
19+
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more)
2020
>at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --))
2121

2222
new Uint8ClampedArray().at(0);

testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols.diff

Lines changed: 0 additions & 11 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/libCompileChecks.errors.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/libCompileChecks.errors.txt.diff

Lines changed: 0 additions & 10 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/libReplacement(libreplacement=true).trace.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,3 +1358,20 @@ Searching all ancestor node_modules directories for fallback extensions: JavaScr
13581358
Directory '/.src/node_modules' does not exist, skipping all lookups in it.
13591359
Directory '/node_modules' does not exist, skipping all lookups in it.
13601360
======== Module name '@typescript/lib-esnext/sharedmemory' was not resolved. ========
1361+
======== Resolving module '@typescript/lib-esnext/typedarrays' from '/.src/__lib_node_modules_lookup_lib.esnext.typedarrays.d.ts__.ts'. ========
1362+
Module resolution kind is not specified, using 'Bundler'.
1363+
Resolving in CJS mode with conditions 'require', 'types'.
1364+
File '/.src/package.json' does not exist according to earlier cached lookups.
1365+
File '/package.json' does not exist according to earlier cached lookups.
1366+
Loading module '@typescript/lib-esnext/typedarrays' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
1367+
Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
1368+
Directory '/.src/node_modules' does not exist, skipping all lookups in it.
1369+
Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.
1370+
Scoped package detected, looking in 'typescript__lib-esnext/typedarrays'
1371+
Directory '/node_modules' does not exist, skipping all lookups in it.
1372+
Directory '/node_modules/@types' does not exist, skipping all lookups in it.
1373+
Scoped package detected, looking in 'typescript__lib-esnext/typedarrays'
1374+
Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.
1375+
Directory '/.src/node_modules' does not exist, skipping all lookups in it.
1376+
Directory '/node_modules' does not exist, skipping all lookups in it.
1377+
======== Module name '@typescript/lib-esnext/typedarrays' was not resolved. ========

testdata/baselines/reference/submodule/compiler/subclassUint8Array.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
=== subclassUint8Array.ts ===
44
class CustomBuffer extends Uint8Array {
55
>CustomBuffer : Symbol(CustomBuffer, Decl(subclassUint8Array.ts, 0, 0))
6-
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more)
6+
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more)
77
}
88

0 commit comments

Comments
 (0)