@typescript-deploys/pr-build 5.5.0-pr-58326-8 → 5.5.0-pr-58440-13
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 +26 -23
- package/lib/typescript.js +26 -23
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -46669,12 +46669,7 @@ function createTypeChecker(host) {
|
|
|
46669
46669
|
if (resolvedTarget === unknownSymbol) {
|
|
46670
46670
|
return source;
|
|
46671
46671
|
}
|
|
46672
|
-
|
|
46673
|
-
target = cloneSymbol(resolvedTarget);
|
|
46674
|
-
} else {
|
|
46675
|
-
reportMergeSymbolError(target, source);
|
|
46676
|
-
return source;
|
|
46677
|
-
}
|
|
46672
|
+
target = cloneSymbol(resolvedTarget);
|
|
46678
46673
|
}
|
|
46679
46674
|
if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
|
|
46680
46675
|
target.constEnumOnlyModule = false;
|
|
@@ -46706,34 +46701,31 @@ function createTypeChecker(host) {
|
|
|
46706
46701
|
);
|
|
46707
46702
|
}
|
|
46708
46703
|
} else {
|
|
46709
|
-
|
|
46710
|
-
|
|
46711
|
-
return target;
|
|
46712
|
-
function reportMergeSymbolError(target2, source2) {
|
|
46713
|
-
const isEitherEnum = !!(target2.flags & 384 /* Enum */ || source2.flags & 384 /* Enum */);
|
|
46714
|
-
const isEitherBlockScoped = !!(target2.flags & 2 /* BlockScopedVariable */ || source2.flags & 2 /* BlockScopedVariable */);
|
|
46704
|
+
const isEitherEnum = !!(target.flags & 384 /* Enum */ || source.flags & 384 /* Enum */);
|
|
46705
|
+
const isEitherBlockScoped = !!(target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */);
|
|
46715
46706
|
const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;
|
|
46716
|
-
const sourceSymbolFile =
|
|
46717
|
-
const targetSymbolFile =
|
|
46707
|
+
const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]);
|
|
46708
|
+
const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]);
|
|
46718
46709
|
const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
|
|
46719
46710
|
const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
|
|
46720
|
-
const symbolName2 = symbolToString(
|
|
46711
|
+
const symbolName2 = symbolToString(source);
|
|
46721
46712
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
46722
46713
|
const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
46723
46714
|
const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
46724
46715
|
const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() }));
|
|
46725
46716
|
const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] }));
|
|
46726
46717
|
if (!isSourcePlainJs)
|
|
46727
|
-
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations,
|
|
46718
|
+
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
|
|
46728
46719
|
if (!isTargetPlainJs)
|
|
46729
|
-
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations,
|
|
46720
|
+
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
|
|
46730
46721
|
} else {
|
|
46731
46722
|
if (!isSourcePlainJs)
|
|
46732
|
-
addDuplicateDeclarationErrorsForSymbols(
|
|
46723
|
+
addDuplicateDeclarationErrorsForSymbols(source, message, symbolName2, target);
|
|
46733
46724
|
if (!isTargetPlainJs)
|
|
46734
|
-
addDuplicateDeclarationErrorsForSymbols(
|
|
46725
|
+
addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source);
|
|
46735
46726
|
}
|
|
46736
46727
|
}
|
|
46728
|
+
return target;
|
|
46737
46729
|
function addDuplicateLocations(locs, symbol) {
|
|
46738
46730
|
if (symbol.declarations) {
|
|
46739
46731
|
for (const decl of symbol.declarations) {
|
|
@@ -56200,8 +56192,13 @@ function createTypeChecker(host) {
|
|
|
56200
56192
|
if (left.typeParameters && right.typeParameters) {
|
|
56201
56193
|
paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);
|
|
56202
56194
|
}
|
|
56195
|
+
let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);
|
|
56203
56196
|
const declaration = left.declaration;
|
|
56204
56197
|
const params = combineUnionParameters(left, right, paramMapper);
|
|
56198
|
+
const lastParam = lastOrUndefined(params);
|
|
56199
|
+
if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {
|
|
56200
|
+
flags |= 1 /* HasRestParameter */;
|
|
56201
|
+
}
|
|
56205
56202
|
const thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
56206
56203
|
const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
56207
56204
|
const result = createSignature(
|
|
@@ -56214,7 +56211,7 @@ function createTypeChecker(host) {
|
|
|
56214
56211
|
/*resolvedTypePredicate*/
|
|
56215
56212
|
void 0,
|
|
56216
56213
|
minArgCount,
|
|
56217
|
-
|
|
56214
|
+
flags
|
|
56218
56215
|
);
|
|
56219
56216
|
result.compositeKind = 1048576 /* Union */;
|
|
56220
56217
|
result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);
|
|
@@ -71185,13 +71182,14 @@ function createTypeChecker(host) {
|
|
|
71185
71182
|
const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
|
|
71186
71183
|
const paramSymbol = createSymbol(
|
|
71187
71184
|
1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
|
|
71188
|
-
paramName || `arg${i}
|
|
71185
|
+
paramName || `arg${i}`,
|
|
71186
|
+
isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
|
|
71189
71187
|
);
|
|
71190
71188
|
paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71191
71189
|
params[i] = paramSymbol;
|
|
71192
71190
|
}
|
|
71193
71191
|
if (needsExtraRestElement) {
|
|
71194
|
-
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
|
|
71192
|
+
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
|
|
71195
71193
|
restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
71196
71194
|
if (shorter === right) {
|
|
71197
71195
|
restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
|
|
@@ -71206,8 +71204,13 @@ function createTypeChecker(host) {
|
|
|
71206
71204
|
if (left.typeParameters && right.typeParameters) {
|
|
71207
71205
|
paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);
|
|
71208
71206
|
}
|
|
71207
|
+
let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);
|
|
71209
71208
|
const declaration = left.declaration;
|
|
71210
71209
|
const params = combineIntersectionParameters(left, right, paramMapper);
|
|
71210
|
+
const lastParam = lastOrUndefined(params);
|
|
71211
|
+
if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {
|
|
71212
|
+
flags |= 1 /* HasRestParameter */;
|
|
71213
|
+
}
|
|
71211
71214
|
const thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
71212
71215
|
const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
71213
71216
|
const result = createSignature(
|
|
@@ -71220,7 +71223,7 @@ function createTypeChecker(host) {
|
|
|
71220
71223
|
/*resolvedTypePredicate*/
|
|
71221
71224
|
void 0,
|
|
71222
71225
|
minArgCount,
|
|
71223
|
-
|
|
71226
|
+
flags
|
|
71224
71227
|
);
|
|
71225
71228
|
result.compositeKind = 2097152 /* Intersection */;
|
|
71226
71229
|
result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);
|
package/lib/typescript.js
CHANGED
|
@@ -51509,12 +51509,7 @@ function createTypeChecker(host) {
|
|
|
51509
51509
|
if (resolvedTarget === unknownSymbol) {
|
|
51510
51510
|
return source;
|
|
51511
51511
|
}
|
|
51512
|
-
|
|
51513
|
-
target = cloneSymbol(resolvedTarget);
|
|
51514
|
-
} else {
|
|
51515
|
-
reportMergeSymbolError(target, source);
|
|
51516
|
-
return source;
|
|
51517
|
-
}
|
|
51512
|
+
target = cloneSymbol(resolvedTarget);
|
|
51518
51513
|
}
|
|
51519
51514
|
if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
|
|
51520
51515
|
target.constEnumOnlyModule = false;
|
|
@@ -51546,34 +51541,31 @@ function createTypeChecker(host) {
|
|
|
51546
51541
|
);
|
|
51547
51542
|
}
|
|
51548
51543
|
} else {
|
|
51549
|
-
|
|
51550
|
-
|
|
51551
|
-
return target;
|
|
51552
|
-
function reportMergeSymbolError(target2, source2) {
|
|
51553
|
-
const isEitherEnum = !!(target2.flags & 384 /* Enum */ || source2.flags & 384 /* Enum */);
|
|
51554
|
-
const isEitherBlockScoped = !!(target2.flags & 2 /* BlockScopedVariable */ || source2.flags & 2 /* BlockScopedVariable */);
|
|
51544
|
+
const isEitherEnum = !!(target.flags & 384 /* Enum */ || source.flags & 384 /* Enum */);
|
|
51545
|
+
const isEitherBlockScoped = !!(target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */);
|
|
51555
51546
|
const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;
|
|
51556
|
-
const sourceSymbolFile =
|
|
51557
|
-
const targetSymbolFile =
|
|
51547
|
+
const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]);
|
|
51548
|
+
const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]);
|
|
51558
51549
|
const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
|
|
51559
51550
|
const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
|
|
51560
|
-
const symbolName2 = symbolToString(
|
|
51551
|
+
const symbolName2 = symbolToString(source);
|
|
51561
51552
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
51562
51553
|
const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
51563
51554
|
const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
51564
51555
|
const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() }));
|
|
51565
51556
|
const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] }));
|
|
51566
51557
|
if (!isSourcePlainJs)
|
|
51567
|
-
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations,
|
|
51558
|
+
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
|
|
51568
51559
|
if (!isTargetPlainJs)
|
|
51569
|
-
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations,
|
|
51560
|
+
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
|
|
51570
51561
|
} else {
|
|
51571
51562
|
if (!isSourcePlainJs)
|
|
51572
|
-
addDuplicateDeclarationErrorsForSymbols(
|
|
51563
|
+
addDuplicateDeclarationErrorsForSymbols(source, message, symbolName2, target);
|
|
51573
51564
|
if (!isTargetPlainJs)
|
|
51574
|
-
addDuplicateDeclarationErrorsForSymbols(
|
|
51565
|
+
addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source);
|
|
51575
51566
|
}
|
|
51576
51567
|
}
|
|
51568
|
+
return target;
|
|
51577
51569
|
function addDuplicateLocations(locs, symbol) {
|
|
51578
51570
|
if (symbol.declarations) {
|
|
51579
51571
|
for (const decl of symbol.declarations) {
|
|
@@ -61040,8 +61032,13 @@ function createTypeChecker(host) {
|
|
|
61040
61032
|
if (left.typeParameters && right.typeParameters) {
|
|
61041
61033
|
paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);
|
|
61042
61034
|
}
|
|
61035
|
+
let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);
|
|
61043
61036
|
const declaration = left.declaration;
|
|
61044
61037
|
const params = combineUnionParameters(left, right, paramMapper);
|
|
61038
|
+
const lastParam = lastOrUndefined(params);
|
|
61039
|
+
if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {
|
|
61040
|
+
flags |= 1 /* HasRestParameter */;
|
|
61041
|
+
}
|
|
61045
61042
|
const thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
61046
61043
|
const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
61047
61044
|
const result = createSignature(
|
|
@@ -61054,7 +61051,7 @@ function createTypeChecker(host) {
|
|
|
61054
61051
|
/*resolvedTypePredicate*/
|
|
61055
61052
|
void 0,
|
|
61056
61053
|
minArgCount,
|
|
61057
|
-
|
|
61054
|
+
flags
|
|
61058
61055
|
);
|
|
61059
61056
|
result.compositeKind = 1048576 /* Union */;
|
|
61060
61057
|
result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);
|
|
@@ -76025,13 +76022,14 @@ function createTypeChecker(host) {
|
|
|
76025
76022
|
const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
|
|
76026
76023
|
const paramSymbol = createSymbol(
|
|
76027
76024
|
1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
|
|
76028
|
-
paramName || `arg${i}
|
|
76025
|
+
paramName || `arg${i}`,
|
|
76026
|
+
isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
|
|
76029
76027
|
);
|
|
76030
76028
|
paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
76031
76029
|
params[i] = paramSymbol;
|
|
76032
76030
|
}
|
|
76033
76031
|
if (needsExtraRestElement) {
|
|
76034
|
-
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
|
|
76032
|
+
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
|
|
76035
76033
|
restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
76036
76034
|
if (shorter === right) {
|
|
76037
76035
|
restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
|
|
@@ -76046,8 +76044,13 @@ function createTypeChecker(host) {
|
|
|
76046
76044
|
if (left.typeParameters && right.typeParameters) {
|
|
76047
76045
|
paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);
|
|
76048
76046
|
}
|
|
76047
|
+
let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);
|
|
76049
76048
|
const declaration = left.declaration;
|
|
76050
76049
|
const params = combineIntersectionParameters(left, right, paramMapper);
|
|
76050
|
+
const lastParam = lastOrUndefined(params);
|
|
76051
|
+
if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {
|
|
76052
|
+
flags |= 1 /* HasRestParameter */;
|
|
76053
|
+
}
|
|
76051
76054
|
const thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper);
|
|
76052
76055
|
const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
|
|
76053
76056
|
const result = createSignature(
|
|
@@ -76060,7 +76063,7 @@ function createTypeChecker(host) {
|
|
|
76060
76063
|
/*resolvedTypePredicate*/
|
|
76061
76064
|
void 0,
|
|
76062
76065
|
minArgCount,
|
|
76063
|
-
|
|
76066
|
+
flags
|
|
76064
76067
|
);
|
|
76065
76068
|
result.compositeKind = 2097152 /* Intersection */;
|
|
76066
76069
|
result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-pr-
|
|
5
|
+
"version": "5.5.0-pr-58440-13",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|