@typescript-deploys/pr-build 6.0.0-pr-61061-8 → 6.0.0-pr-56976-2
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 +10 -13
- package/lib/typescript.d.ts +2 -3
- package/lib/typescript.js +16 -24
- 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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20251008`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -14154,7 +14154,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) {
|
|
|
14154
14154
|
return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0;
|
|
14155
14155
|
}
|
|
14156
14156
|
function getJSDocCommentRanges(node, text) {
|
|
14157
|
-
const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */
|
|
14157
|
+
const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
|
|
14158
14158
|
return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range
|
|
14159
14159
|
text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */);
|
|
14160
14160
|
}
|
|
@@ -15396,7 +15396,6 @@ function canHaveJSDoc(node) {
|
|
|
15396
15396
|
case 244 /* VariableStatement */:
|
|
15397
15397
|
case 248 /* WhileStatement */:
|
|
15398
15398
|
case 255 /* WithStatement */:
|
|
15399
|
-
case 201 /* MappedType */:
|
|
15400
15399
|
return true;
|
|
15401
15400
|
default:
|
|
15402
15401
|
return false;
|
|
@@ -31128,7 +31127,6 @@ var Parser;
|
|
|
31128
31127
|
}
|
|
31129
31128
|
function parseMappedType() {
|
|
31130
31129
|
const pos = getNodePos();
|
|
31131
|
-
const hasJSDoc = hasPrecedingJSDocComment();
|
|
31132
31130
|
parseExpected(19 /* OpenBraceToken */);
|
|
31133
31131
|
let readonlyToken;
|
|
31134
31132
|
if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
|
|
@@ -31152,10 +31150,7 @@ var Parser;
|
|
|
31152
31150
|
parseSemicolon();
|
|
31153
31151
|
const members = parseList(4 /* TypeMembers */, parseTypeMember);
|
|
31154
31152
|
parseExpected(20 /* CloseBraceToken */);
|
|
31155
|
-
return
|
|
31156
|
-
finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
|
|
31157
|
-
hasJSDoc
|
|
31158
|
-
);
|
|
31153
|
+
return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
|
|
31159
31154
|
}
|
|
31160
31155
|
function parseTupleElementType() {
|
|
31161
31156
|
const pos = getNodePos();
|
|
@@ -58488,7 +58483,6 @@ function createTypeChecker(host) {
|
|
|
58488
58483
|
const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
|
|
58489
58484
|
const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
|
|
58490
58485
|
const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0));
|
|
58491
|
-
prop.parent = mappedType.symbol;
|
|
58492
58486
|
prop.links.mappedType = type;
|
|
58493
58487
|
prop.links.nameType = propNameType;
|
|
58494
58488
|
prop.links.keyType = keyType;
|
|
@@ -68990,7 +68984,7 @@ function createTypeChecker(host) {
|
|
|
68990
68984
|
if (sourceNameType && targetNameType) inferFromTypes(sourceNameType, targetNameType);
|
|
68991
68985
|
}
|
|
68992
68986
|
function inferFromObjectTypes(source, target) {
|
|
68993
|
-
var _a, _b;
|
|
68987
|
+
var _a, _b, _c;
|
|
68994
68988
|
if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {
|
|
68995
68989
|
inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
|
|
68996
68990
|
return;
|
|
@@ -69031,13 +69025,16 @@ function createTypeChecker(host) {
|
|
|
69031
69025
|
const middleLength = targetArity - startLength - endLength;
|
|
69032
69026
|
if (middleLength === 2) {
|
|
69033
69027
|
if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
69034
|
-
|
|
69028
|
+
let targetInfo = getInferenceInfoForType(elementTypes[startLength]);
|
|
69035
69029
|
if (targetInfo && targetInfo.impliedArity !== void 0) {
|
|
69036
69030
|
inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
|
|
69037
69031
|
inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
|
|
69032
|
+
} else if (((_a = targetInfo = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _a.impliedArity) !== void 0) {
|
|
69033
|
+
inferFromTypes(sliceTupleType(source, startLength, endLength + targetInfo.impliedArity), elementTypes[startLength]);
|
|
69034
|
+
inferFromTypes(sliceTupleType(source, startLength + sourceArity - endLength - targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
|
|
69038
69035
|
}
|
|
69039
69036
|
} else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {
|
|
69040
|
-
const param = (
|
|
69037
|
+
const param = (_b = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _b.typeParameter;
|
|
69041
69038
|
const constraint = param && getBaseConstraintOfType(param);
|
|
69042
69039
|
if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {
|
|
69043
69040
|
const impliedArity = constraint.target.fixedLength;
|
|
@@ -69045,7 +69042,7 @@ function createTypeChecker(host) {
|
|
|
69045
69042
|
inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]);
|
|
69046
69043
|
}
|
|
69047
69044
|
} else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
69048
|
-
const param = (
|
|
69045
|
+
const param = (_c = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _c.typeParameter;
|
|
69049
69046
|
const constraint = param && getBaseConstraintOfType(param);
|
|
69050
69047
|
if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {
|
|
69051
69048
|
const impliedArity = constraint.target.fixedLength;
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4394,8 +4394,7 @@ declare namespace ts {
|
|
|
4394
4394
|
| VariableDeclaration
|
|
4395
4395
|
| VariableStatement
|
|
4396
4396
|
| WhileStatement
|
|
4397
|
-
| WithStatement
|
|
4398
|
-
| MappedTypeNode;
|
|
4397
|
+
| WithStatement;
|
|
4399
4398
|
type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
|
|
4400
4399
|
type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
|
|
4401
4400
|
type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
|
|
@@ -4814,7 +4813,7 @@ declare namespace ts {
|
|
|
4814
4813
|
readonly objectType: TypeNode;
|
|
4815
4814
|
readonly indexType: TypeNode;
|
|
4816
4815
|
}
|
|
4817
|
-
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer
|
|
4816
|
+
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
|
|
4818
4817
|
readonly kind: SyntaxKind.MappedType;
|
|
4819
4818
|
readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
|
|
4820
4819
|
readonly typeParameter: TypeParameterDeclaration;
|
package/lib/typescript.js
CHANGED
|
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2286
2286
|
|
|
2287
2287
|
// src/compiler/corePublic.ts
|
|
2288
2288
|
var versionMajorMinor = "6.0";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20251008`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -17842,7 +17842,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) {
|
|
|
17842
17842
|
return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0;
|
|
17843
17843
|
}
|
|
17844
17844
|
function getJSDocCommentRanges(node, text) {
|
|
17845
|
-
const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */
|
|
17845
|
+
const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
|
|
17846
17846
|
return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range
|
|
17847
17847
|
text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */);
|
|
17848
17848
|
}
|
|
@@ -19123,7 +19123,6 @@ function canHaveJSDoc(node) {
|
|
|
19123
19123
|
case 244 /* VariableStatement */:
|
|
19124
19124
|
case 248 /* WhileStatement */:
|
|
19125
19125
|
case 255 /* WithStatement */:
|
|
19126
|
-
case 201 /* MappedType */:
|
|
19127
19126
|
return true;
|
|
19128
19127
|
default:
|
|
19129
19128
|
return false;
|
|
@@ -35384,7 +35383,6 @@ var Parser;
|
|
|
35384
35383
|
}
|
|
35385
35384
|
function parseMappedType() {
|
|
35386
35385
|
const pos = getNodePos();
|
|
35387
|
-
const hasJSDoc = hasPrecedingJSDocComment();
|
|
35388
35386
|
parseExpected(19 /* OpenBraceToken */);
|
|
35389
35387
|
let readonlyToken;
|
|
35390
35388
|
if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
|
|
@@ -35408,10 +35406,7 @@ var Parser;
|
|
|
35408
35406
|
parseSemicolon();
|
|
35409
35407
|
const members = parseList(4 /* TypeMembers */, parseTypeMember);
|
|
35410
35408
|
parseExpected(20 /* CloseBraceToken */);
|
|
35411
|
-
return
|
|
35412
|
-
finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
|
|
35413
|
-
hasJSDoc
|
|
35414
|
-
);
|
|
35409
|
+
return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
|
|
35415
35410
|
}
|
|
35416
35411
|
function parseTupleElementType() {
|
|
35417
35412
|
const pos = getNodePos();
|
|
@@ -63094,7 +63089,6 @@ function createTypeChecker(host) {
|
|
|
63094
63089
|
const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
|
|
63095
63090
|
const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
|
|
63096
63091
|
const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0));
|
|
63097
|
-
prop.parent = mappedType.symbol;
|
|
63098
63092
|
prop.links.mappedType = type;
|
|
63099
63093
|
prop.links.nameType = propNameType;
|
|
63100
63094
|
prop.links.keyType = keyType;
|
|
@@ -73596,7 +73590,7 @@ function createTypeChecker(host) {
|
|
|
73596
73590
|
if (sourceNameType && targetNameType) inferFromTypes(sourceNameType, targetNameType);
|
|
73597
73591
|
}
|
|
73598
73592
|
function inferFromObjectTypes(source, target) {
|
|
73599
|
-
var _a, _b;
|
|
73593
|
+
var _a, _b, _c;
|
|
73600
73594
|
if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {
|
|
73601
73595
|
inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
|
|
73602
73596
|
return;
|
|
@@ -73637,13 +73631,16 @@ function createTypeChecker(host) {
|
|
|
73637
73631
|
const middleLength = targetArity - startLength - endLength;
|
|
73638
73632
|
if (middleLength === 2) {
|
|
73639
73633
|
if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
73640
|
-
|
|
73634
|
+
let targetInfo = getInferenceInfoForType(elementTypes[startLength]);
|
|
73641
73635
|
if (targetInfo && targetInfo.impliedArity !== void 0) {
|
|
73642
73636
|
inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
|
|
73643
73637
|
inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
|
|
73638
|
+
} else if (((_a = targetInfo = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _a.impliedArity) !== void 0) {
|
|
73639
|
+
inferFromTypes(sliceTupleType(source, startLength, endLength + targetInfo.impliedArity), elementTypes[startLength]);
|
|
73640
|
+
inferFromTypes(sliceTupleType(source, startLength + sourceArity - endLength - targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);
|
|
73644
73641
|
}
|
|
73645
73642
|
} else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {
|
|
73646
|
-
const param = (
|
|
73643
|
+
const param = (_b = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _b.typeParameter;
|
|
73647
73644
|
const constraint = param && getBaseConstraintOfType(param);
|
|
73648
73645
|
if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {
|
|
73649
73646
|
const impliedArity = constraint.target.fixedLength;
|
|
@@ -73651,7 +73648,7 @@ function createTypeChecker(host) {
|
|
|
73651
73648
|
inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]);
|
|
73652
73649
|
}
|
|
73653
73650
|
} else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
73654
|
-
const param = (
|
|
73651
|
+
const param = (_c = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _c.typeParameter;
|
|
73655
73652
|
const constraint = param && getBaseConstraintOfType(param);
|
|
73656
73653
|
if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {
|
|
73657
73654
|
const impliedArity = constraint.target.fixedLength;
|
|
@@ -152140,12 +152137,9 @@ var SymbolObject = class {
|
|
|
152140
152137
|
return this.declarations;
|
|
152141
152138
|
}
|
|
152142
152139
|
getDocumentationComment(checker) {
|
|
152143
|
-
var _a, _b, _c, _d;
|
|
152144
152140
|
if (!this.documentationComment) {
|
|
152145
152141
|
this.documentationComment = emptyArray;
|
|
152146
|
-
if (!this.declarations && isTransientSymbol(this) && this.links.
|
|
152147
|
-
this.documentationComment = getDocumentationComment((_d = this.parent) == null ? void 0 : _d.declarations.concat(((_c = this.links.syntheticOrigin) == null ? void 0 : _c.declarations) || emptyArray), checker);
|
|
152148
|
-
} else if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {
|
|
152142
|
+
if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {
|
|
152149
152143
|
const labelDecl = this.links.target.links.tupleLabelDeclaration;
|
|
152150
152144
|
this.documentationComment = getDocumentationComment([labelDecl], checker);
|
|
152151
152145
|
} else {
|
|
@@ -174826,9 +174820,7 @@ function isExpandoDeclaration(node) {
|
|
|
174826
174820
|
return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */;
|
|
174827
174821
|
}
|
|
174828
174822
|
function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) {
|
|
174829
|
-
|
|
174830
|
-
const declarations = isTransientSymbol(symbol) && symbol.links.checkFlags & 262144 /* Mapped */ && !((_a = symbol.declarations) == null ? void 0 : _a.length) ? (_b = symbol.links.syntheticOrigin) == null ? void 0 : _b.declarations : symbol.declarations;
|
|
174831
|
-
const filteredDeclarations = declarationFilter !== void 0 ? filter(declarations, declarationFilter) : declarations;
|
|
174823
|
+
const filteredDeclarations = declarationFilter !== void 0 ? filter(symbol.declarations, declarationFilter) : symbol.declarations;
|
|
174832
174824
|
const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());
|
|
174833
174825
|
if (signatureDefinition) {
|
|
174834
174826
|
return signatureDefinition;
|
|
@@ -174865,10 +174857,10 @@ function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolutio
|
|
|
174865
174857
|
if (!signatureDeclarations) {
|
|
174866
174858
|
return void 0;
|
|
174867
174859
|
}
|
|
174868
|
-
const
|
|
174869
|
-
const declarationsWithBody =
|
|
174870
|
-
return
|
|
174871
|
-
last(
|
|
174860
|
+
const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike);
|
|
174861
|
+
const declarationsWithBody = declarations.filter((d) => !!d.body);
|
|
174862
|
+
return declarations.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo(
|
|
174863
|
+
last(declarations),
|
|
174872
174864
|
typeChecker,
|
|
174873
174865
|
symbol,
|
|
174874
174866
|
node,
|
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": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-56976-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|