typescript 5.4.4 → 5.4.5
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 +7 -9
- package/lib/tsserver.js +9 -10
- package/lib/typescript.js +9 -10
- package/lib/typingsInstaller.js +1 -1
- package/package.json +1 -1
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.4";
|
|
21
|
-
var version = "5.4.
|
|
21
|
+
var version = "5.4.5";
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -55344,12 +55344,10 @@ function createTypeChecker(host) {
|
|
|
55344
55344
|
const target = type.target ?? type;
|
|
55345
55345
|
const typeVariable = getHomomorphicTypeVariable(target);
|
|
55346
55346
|
if (typeVariable && !target.declaration.nameType) {
|
|
55347
|
-
const
|
|
55348
|
-
|
|
55349
|
-
|
|
55350
|
-
|
|
55351
|
-
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
55352
|
-
}
|
|
55347
|
+
const modifiersType = getModifiersTypeFromMappedType(type);
|
|
55348
|
+
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
|
55349
|
+
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
|
55350
|
+
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
55353
55351
|
}
|
|
55354
55352
|
}
|
|
55355
55353
|
return type;
|
|
@@ -55510,13 +55508,13 @@ function createTypeChecker(host) {
|
|
|
55510
55508
|
}
|
|
55511
55509
|
function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) {
|
|
55512
55510
|
var _a, _b, _c;
|
|
55513
|
-
let property = (
|
|
55511
|
+
let property = skipObjectFunctionPropertyAugment ? (_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);
|
|
55514
55512
|
if (!property) {
|
|
55515
55513
|
property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
55516
55514
|
if (property) {
|
|
55517
55515
|
const properties = skipObjectFunctionPropertyAugment ? type.propertyCacheWithoutObjectFunctionPropertyAugment || (type.propertyCacheWithoutObjectFunctionPropertyAugment = createSymbolTable()) : type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
55518
55516
|
properties.set(name, property);
|
|
55519
|
-
if (skipObjectFunctionPropertyAugment && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
55517
|
+
if (skipObjectFunctionPropertyAugment && !(getCheckFlags(property) & 48 /* Partial */) && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
55520
55518
|
const properties2 = type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
55521
55519
|
properties2.set(name, property);
|
|
55522
55520
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2340
2340
|
|
|
2341
2341
|
// src/compiler/corePublic.ts
|
|
2342
2342
|
var versionMajorMinor = "5.4";
|
|
2343
|
-
var version = "5.4.
|
|
2343
|
+
var version = "5.4.5";
|
|
2344
2344
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2345
2345
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2346
2346
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60088,12 +60088,10 @@ function createTypeChecker(host) {
|
|
|
60088
60088
|
const target = type.target ?? type;
|
|
60089
60089
|
const typeVariable = getHomomorphicTypeVariable(target);
|
|
60090
60090
|
if (typeVariable && !target.declaration.nameType) {
|
|
60091
|
-
const
|
|
60092
|
-
|
|
60093
|
-
|
|
60094
|
-
|
|
60095
|
-
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
60096
|
-
}
|
|
60091
|
+
const modifiersType = getModifiersTypeFromMappedType(type);
|
|
60092
|
+
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
|
60093
|
+
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
|
60094
|
+
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
60097
60095
|
}
|
|
60098
60096
|
}
|
|
60099
60097
|
return type;
|
|
@@ -60254,13 +60252,13 @@ function createTypeChecker(host) {
|
|
|
60254
60252
|
}
|
|
60255
60253
|
function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) {
|
|
60256
60254
|
var _a, _b, _c;
|
|
60257
|
-
let property = (
|
|
60255
|
+
let property = skipObjectFunctionPropertyAugment ? (_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);
|
|
60258
60256
|
if (!property) {
|
|
60259
60257
|
property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
60260
60258
|
if (property) {
|
|
60261
60259
|
const properties = skipObjectFunctionPropertyAugment ? type.propertyCacheWithoutObjectFunctionPropertyAugment || (type.propertyCacheWithoutObjectFunctionPropertyAugment = createSymbolTable()) : type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
60262
60260
|
properties.set(name, property);
|
|
60263
|
-
if (skipObjectFunctionPropertyAugment && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
60261
|
+
if (skipObjectFunctionPropertyAugment && !(getCheckFlags(property) & 48 /* Partial */) && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
60264
60262
|
const properties2 = type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
60265
60263
|
properties2.set(name, property);
|
|
60266
60264
|
}
|
|
@@ -160459,7 +160457,8 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
|
|
|
160459
160457
|
}
|
|
160460
160458
|
function symbolAppearsToBeTypeOnly(symbol) {
|
|
160461
160459
|
var _a;
|
|
160462
|
-
|
|
160460
|
+
const flags = getCombinedLocalAndExportSymbolFlags(skipAlias(symbol, typeChecker));
|
|
160461
|
+
return !(flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(flags & 788968 /* Type */));
|
|
160463
160462
|
}
|
|
160464
160463
|
}
|
|
160465
160464
|
function getLabelCompletionAtPosition(node) {
|
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.4";
|
|
38
|
-
version = "5.4.
|
|
38
|
+
version = "5.4.5";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -57843,12 +57843,10 @@ ${lanes.join("\n")}
|
|
|
57843
57843
|
const target = type.target ?? type;
|
|
57844
57844
|
const typeVariable = getHomomorphicTypeVariable(target);
|
|
57845
57845
|
if (typeVariable && !target.declaration.nameType) {
|
|
57846
|
-
const
|
|
57847
|
-
|
|
57848
|
-
|
|
57849
|
-
|
|
57850
|
-
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
57851
|
-
}
|
|
57846
|
+
const modifiersType = getModifiersTypeFromMappedType(type);
|
|
57847
|
+
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
|
57848
|
+
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
|
57849
|
+
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
|
57852
57850
|
}
|
|
57853
57851
|
}
|
|
57854
57852
|
return type;
|
|
@@ -58009,13 +58007,13 @@ ${lanes.join("\n")}
|
|
|
58009
58007
|
}
|
|
58010
58008
|
function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) {
|
|
58011
58009
|
var _a, _b, _c;
|
|
58012
|
-
let property = (
|
|
58010
|
+
let property = skipObjectFunctionPropertyAugment ? (_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);
|
|
58013
58011
|
if (!property) {
|
|
58014
58012
|
property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
58015
58013
|
if (property) {
|
|
58016
58014
|
const properties = skipObjectFunctionPropertyAugment ? type.propertyCacheWithoutObjectFunctionPropertyAugment || (type.propertyCacheWithoutObjectFunctionPropertyAugment = createSymbolTable()) : type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
58017
58015
|
properties.set(name, property);
|
|
58018
|
-
if (skipObjectFunctionPropertyAugment && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
58016
|
+
if (skipObjectFunctionPropertyAugment && !(getCheckFlags(property) & 48 /* Partial */) && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {
|
|
58019
58017
|
const properties2 = type.propertyCache || (type.propertyCache = createSymbolTable());
|
|
58020
58018
|
properties2.set(name, property);
|
|
58021
58019
|
}
|
|
@@ -159682,7 +159680,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159682
159680
|
}
|
|
159683
159681
|
function symbolAppearsToBeTypeOnly(symbol) {
|
|
159684
159682
|
var _a;
|
|
159685
|
-
|
|
159683
|
+
const flags = getCombinedLocalAndExportSymbolFlags(skipAlias(symbol, typeChecker));
|
|
159684
|
+
return !(flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(flags & 788968 /* Type */));
|
|
159686
159685
|
}
|
|
159687
159686
|
}
|
|
159688
159687
|
function getLabelCompletionAtPosition(node) {
|
package/lib/typingsInstaller.js
CHANGED
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.4.
|
|
5
|
+
"version": "5.4.5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|