typescript 5.3.0-dev.20230910 → 5.3.0-dev.20230912
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.
- package/lib/tsc.js +17 -5
- package/lib/tsserver.js +19 -7
- package/lib/typescript.js +19 -7
- package/lib/typingsInstaller.js +2 -1
- package/package.json +3 -3
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230912`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -3704,6 +3704,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
|
3704
3704
|
ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
|
|
3705
3705
|
ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
|
|
3706
3706
|
ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
|
|
3707
|
+
ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
|
|
3707
3708
|
ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
|
|
3708
3709
|
ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
|
|
3709
3710
|
ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
|
|
@@ -56265,8 +56266,7 @@ function createTypeChecker(host) {
|
|
|
56265
56266
|
if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) {
|
|
56266
56267
|
return readonly ? globalReadonlyArrayType : globalArrayType;
|
|
56267
56268
|
}
|
|
56268
|
-
const
|
|
56269
|
-
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : "");
|
|
56269
|
+
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
56270
56270
|
let type = tupleTypes.get(key);
|
|
56271
56271
|
if (!type) {
|
|
56272
56272
|
tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations));
|
|
@@ -62406,8 +62406,13 @@ function createTypeChecker(host) {
|
|
|
62406
62406
|
if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
|
|
62407
62407
|
return type.node;
|
|
62408
62408
|
}
|
|
62409
|
-
if (type.symbol
|
|
62410
|
-
|
|
62409
|
+
if (type.symbol) {
|
|
62410
|
+
if (getObjectFlags(type) & 32 /* Mapped */) {
|
|
62411
|
+
type = getMappedTargetWithSymbol(type);
|
|
62412
|
+
}
|
|
62413
|
+
if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
|
|
62414
|
+
return type.symbol;
|
|
62415
|
+
}
|
|
62411
62416
|
}
|
|
62412
62417
|
if (isTupleType(type)) {
|
|
62413
62418
|
return type.target;
|
|
@@ -62427,6 +62432,13 @@ function createTypeChecker(host) {
|
|
|
62427
62432
|
}
|
|
62428
62433
|
return type;
|
|
62429
62434
|
}
|
|
62435
|
+
function getMappedTargetWithSymbol(type) {
|
|
62436
|
+
let target = type;
|
|
62437
|
+
while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
|
|
62438
|
+
target = getModifiersTypeFromMappedType(target);
|
|
62439
|
+
}
|
|
62440
|
+
return target.symbol ? target : type;
|
|
62441
|
+
}
|
|
62430
62442
|
function isPropertyIdenticalTo(sourceProp, targetProp) {
|
|
62431
62443
|
return compareProperties(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
|
|
62432
62444
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.3";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-dev.20230912`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6695,6 +6695,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
|
6695
6695
|
ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
|
|
6696
6696
|
ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
|
|
6697
6697
|
ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
|
|
6698
|
+
ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
|
|
6698
6699
|
ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
|
|
6699
6700
|
ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
|
|
6700
6701
|
ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
|
|
@@ -60967,8 +60968,7 @@ function createTypeChecker(host) {
|
|
|
60967
60968
|
if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) {
|
|
60968
60969
|
return readonly ? globalReadonlyArrayType : globalArrayType;
|
|
60969
60970
|
}
|
|
60970
|
-
const
|
|
60971
|
-
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : "");
|
|
60971
|
+
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
60972
60972
|
let type = tupleTypes.get(key);
|
|
60973
60973
|
if (!type) {
|
|
60974
60974
|
tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations));
|
|
@@ -67108,8 +67108,13 @@ function createTypeChecker(host) {
|
|
|
67108
67108
|
if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
|
|
67109
67109
|
return type.node;
|
|
67110
67110
|
}
|
|
67111
|
-
if (type.symbol
|
|
67112
|
-
|
|
67111
|
+
if (type.symbol) {
|
|
67112
|
+
if (getObjectFlags(type) & 32 /* Mapped */) {
|
|
67113
|
+
type = getMappedTargetWithSymbol(type);
|
|
67114
|
+
}
|
|
67115
|
+
if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
|
|
67116
|
+
return type.symbol;
|
|
67117
|
+
}
|
|
67113
67118
|
}
|
|
67114
67119
|
if (isTupleType(type)) {
|
|
67115
67120
|
return type.target;
|
|
@@ -67129,6 +67134,13 @@ function createTypeChecker(host) {
|
|
|
67129
67134
|
}
|
|
67130
67135
|
return type;
|
|
67131
67136
|
}
|
|
67137
|
+
function getMappedTargetWithSymbol(type) {
|
|
67138
|
+
let target = type;
|
|
67139
|
+
while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
|
|
67140
|
+
target = getModifiersTypeFromMappedType(target);
|
|
67141
|
+
}
|
|
67142
|
+
return target.symbol ? target : type;
|
|
67143
|
+
}
|
|
67132
67144
|
function isPropertyIdenticalTo(sourceProp, targetProp) {
|
|
67133
67145
|
return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
|
|
67134
67146
|
}
|
|
@@ -161154,10 +161166,10 @@ function getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker)
|
|
|
161154
161166
|
return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions;
|
|
161155
161167
|
}
|
|
161156
161168
|
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) {
|
|
161157
|
-
rootDirs = rootDirs.map((rootDirectory) => normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory)));
|
|
161169
|
+
rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))));
|
|
161158
161170
|
const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0);
|
|
161159
161171
|
return deduplicate(
|
|
161160
|
-
[...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory],
|
|
161172
|
+
[...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)),
|
|
161161
161173
|
equateStringsCaseSensitive,
|
|
161162
161174
|
compareStringsCaseSensitive
|
|
161163
161175
|
);
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230912`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4461,6 +4461,7 @@ ${lanes.join("\n")}
|
|
|
4461
4461
|
ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
|
|
4462
4462
|
ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
|
|
4463
4463
|
ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
|
|
4464
|
+
ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
|
|
4464
4465
|
ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
|
|
4465
4466
|
ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
|
|
4466
4467
|
ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
|
|
@@ -58734,8 +58735,7 @@ ${lanes.join("\n")}
|
|
|
58734
58735
|
if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) {
|
|
58735
58736
|
return readonly ? globalReadonlyArrayType : globalArrayType;
|
|
58736
58737
|
}
|
|
58737
|
-
const
|
|
58738
|
-
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : "");
|
|
58738
|
+
const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
58739
58739
|
let type = tupleTypes.get(key);
|
|
58740
58740
|
if (!type) {
|
|
58741
58741
|
tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations));
|
|
@@ -64875,8 +64875,13 @@ ${lanes.join("\n")}
|
|
|
64875
64875
|
if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
|
|
64876
64876
|
return type.node;
|
|
64877
64877
|
}
|
|
64878
|
-
if (type.symbol
|
|
64879
|
-
|
|
64878
|
+
if (type.symbol) {
|
|
64879
|
+
if (getObjectFlags(type) & 32 /* Mapped */) {
|
|
64880
|
+
type = getMappedTargetWithSymbol(type);
|
|
64881
|
+
}
|
|
64882
|
+
if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
|
|
64883
|
+
return type.symbol;
|
|
64884
|
+
}
|
|
64880
64885
|
}
|
|
64881
64886
|
if (isTupleType(type)) {
|
|
64882
64887
|
return type.target;
|
|
@@ -64896,6 +64901,13 @@ ${lanes.join("\n")}
|
|
|
64896
64901
|
}
|
|
64897
64902
|
return type;
|
|
64898
64903
|
}
|
|
64904
|
+
function getMappedTargetWithSymbol(type) {
|
|
64905
|
+
let target = type;
|
|
64906
|
+
while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
|
|
64907
|
+
target = getModifiersTypeFromMappedType(target);
|
|
64908
|
+
}
|
|
64909
|
+
return target.symbol ? target : type;
|
|
64910
|
+
}
|
|
64899
64911
|
function isPropertyIdenticalTo(sourceProp, targetProp) {
|
|
64900
64912
|
return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
|
|
64901
64913
|
}
|
|
@@ -160430,10 +160442,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160430
160442
|
return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions;
|
|
160431
160443
|
}
|
|
160432
160444
|
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) {
|
|
160433
|
-
rootDirs = rootDirs.map((rootDirectory) => normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory)));
|
|
160445
|
+
rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))));
|
|
160434
160446
|
const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0);
|
|
160435
160447
|
return deduplicate(
|
|
160436
|
-
[...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory],
|
|
160448
|
+
[...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)),
|
|
160437
160449
|
equateStringsCaseSensitive,
|
|
160438
160450
|
compareStringsCaseSensitive
|
|
160439
160451
|
);
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230912`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -3138,6 +3138,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
|
3138
3138
|
ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
|
|
3139
3139
|
ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
|
|
3140
3140
|
ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
|
|
3141
|
+
ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
|
|
3141
3142
|
ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
|
|
3142
3143
|
ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
|
|
3143
3144
|
ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20230912",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"chalk": "^4.1.2",
|
|
60
60
|
"chokidar": "^3.5.3",
|
|
61
61
|
"diff": "^5.1.0",
|
|
62
|
-
"dprint": "^0.
|
|
62
|
+
"dprint": "^0.41.0",
|
|
63
63
|
"esbuild": "^0.19.0",
|
|
64
64
|
"eslint": "^8.22.0",
|
|
65
65
|
"eslint-formatter-autolinkable-stylish": "^1.2.0",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"node": "20.1.0",
|
|
113
113
|
"npm": "8.19.4"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "d1738cef6fb5f54fbd14dd4dc0b201734c842344"
|
|
116
116
|
}
|