@typescript-deploys/pr-build 6.0.0-pr-62554-4 → 6.0.0-pr-61061-8
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 +9 -4
- package/lib/typescript.d.ts +3 -2
- package/lib/typescript.js +20 -10
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -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 */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
|
|
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 */ || node.kind === 201 /* MappedType */ ? 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,6 +15396,7 @@ function canHaveJSDoc(node) {
|
|
|
15396
15396
|
case 244 /* VariableStatement */:
|
|
15397
15397
|
case 248 /* WhileStatement */:
|
|
15398
15398
|
case 255 /* WithStatement */:
|
|
15399
|
+
case 201 /* MappedType */:
|
|
15399
15400
|
return true;
|
|
15400
15401
|
default:
|
|
15401
15402
|
return false;
|
|
@@ -31127,6 +31128,7 @@ var Parser;
|
|
|
31127
31128
|
}
|
|
31128
31129
|
function parseMappedType() {
|
|
31129
31130
|
const pos = getNodePos();
|
|
31131
|
+
const hasJSDoc = hasPrecedingJSDocComment();
|
|
31130
31132
|
parseExpected(19 /* OpenBraceToken */);
|
|
31131
31133
|
let readonlyToken;
|
|
31132
31134
|
if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
|
|
@@ -31150,7 +31152,10 @@ var Parser;
|
|
|
31150
31152
|
parseSemicolon();
|
|
31151
31153
|
const members = parseList(4 /* TypeMembers */, parseTypeMember);
|
|
31152
31154
|
parseExpected(20 /* CloseBraceToken */);
|
|
31153
|
-
return
|
|
31155
|
+
return withJSDoc(
|
|
31156
|
+
finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
|
|
31157
|
+
hasJSDoc
|
|
31158
|
+
);
|
|
31154
31159
|
}
|
|
31155
31160
|
function parseTupleElementType() {
|
|
31156
31161
|
const pos = getNodePos();
|
|
@@ -58483,6 +58488,7 @@ function createTypeChecker(host) {
|
|
|
58483
58488
|
const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
|
|
58484
58489
|
const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
|
|
58485
58490
|
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;
|
|
58486
58492
|
prop.links.mappedType = type;
|
|
58487
58493
|
prop.links.nameType = propNameType;
|
|
58488
58494
|
prop.links.keyType = keyType;
|
|
@@ -72640,9 +72646,8 @@ function createTypeChecker(host) {
|
|
|
72640
72646
|
}
|
|
72641
72647
|
}
|
|
72642
72648
|
function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) {
|
|
72643
|
-
var _a;
|
|
72644
72649
|
const parentType = isExpression(declaration.parent) && getContextualType(declaration.parent, contextFlags);
|
|
72645
|
-
if (!parentType
|
|
72650
|
+
if (!parentType) return void 0;
|
|
72646
72651
|
return getTypeOfPropertyOfContextualType(parentType, getSymbolOfDeclaration(declaration).escapedName);
|
|
72647
72652
|
}
|
|
72648
72653
|
function getContextualTypeForInitializerExpression(node, contextFlags) {
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4394,7 +4394,8 @@ declare namespace ts {
|
|
|
4394
4394
|
| VariableDeclaration
|
|
4395
4395
|
| VariableStatement
|
|
4396
4396
|
| WhileStatement
|
|
4397
|
-
| WithStatement
|
|
4397
|
+
| WithStatement
|
|
4398
|
+
| MappedTypeNode;
|
|
4398
4399
|
type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
|
|
4399
4400
|
type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
|
|
4400
4401
|
type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
|
|
@@ -4813,7 +4814,7 @@ declare namespace ts {
|
|
|
4813
4814
|
readonly objectType: TypeNode;
|
|
4814
4815
|
readonly indexType: TypeNode;
|
|
4815
4816
|
}
|
|
4816
|
-
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
|
|
4817
|
+
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer, JSDocContainer {
|
|
4817
4818
|
readonly kind: SyntaxKind.MappedType;
|
|
4818
4819
|
readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
|
|
4819
4820
|
readonly typeParameter: TypeParameterDeclaration;
|
package/lib/typescript.js
CHANGED
|
@@ -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 */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
|
|
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 */ || node.kind === 201 /* MappedType */ ? 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,6 +19123,7 @@ function canHaveJSDoc(node) {
|
|
|
19123
19123
|
case 244 /* VariableStatement */:
|
|
19124
19124
|
case 248 /* WhileStatement */:
|
|
19125
19125
|
case 255 /* WithStatement */:
|
|
19126
|
+
case 201 /* MappedType */:
|
|
19126
19127
|
return true;
|
|
19127
19128
|
default:
|
|
19128
19129
|
return false;
|
|
@@ -35383,6 +35384,7 @@ var Parser;
|
|
|
35383
35384
|
}
|
|
35384
35385
|
function parseMappedType() {
|
|
35385
35386
|
const pos = getNodePos();
|
|
35387
|
+
const hasJSDoc = hasPrecedingJSDocComment();
|
|
35386
35388
|
parseExpected(19 /* OpenBraceToken */);
|
|
35387
35389
|
let readonlyToken;
|
|
35388
35390
|
if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
|
|
@@ -35406,7 +35408,10 @@ var Parser;
|
|
|
35406
35408
|
parseSemicolon();
|
|
35407
35409
|
const members = parseList(4 /* TypeMembers */, parseTypeMember);
|
|
35408
35410
|
parseExpected(20 /* CloseBraceToken */);
|
|
35409
|
-
return
|
|
35411
|
+
return withJSDoc(
|
|
35412
|
+
finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
|
|
35413
|
+
hasJSDoc
|
|
35414
|
+
);
|
|
35410
35415
|
}
|
|
35411
35416
|
function parseTupleElementType() {
|
|
35412
35417
|
const pos = getNodePos();
|
|
@@ -63089,6 +63094,7 @@ function createTypeChecker(host) {
|
|
|
63089
63094
|
const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
|
|
63090
63095
|
const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
|
|
63091
63096
|
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;
|
|
63092
63098
|
prop.links.mappedType = type;
|
|
63093
63099
|
prop.links.nameType = propNameType;
|
|
63094
63100
|
prop.links.keyType = keyType;
|
|
@@ -77246,9 +77252,8 @@ function createTypeChecker(host) {
|
|
|
77246
77252
|
}
|
|
77247
77253
|
}
|
|
77248
77254
|
function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) {
|
|
77249
|
-
var _a;
|
|
77250
77255
|
const parentType = isExpression(declaration.parent) && getContextualType2(declaration.parent, contextFlags);
|
|
77251
|
-
if (!parentType
|
|
77256
|
+
if (!parentType) return void 0;
|
|
77252
77257
|
return getTypeOfPropertyOfContextualType(parentType, getSymbolOfDeclaration(declaration).escapedName);
|
|
77253
77258
|
}
|
|
77254
77259
|
function getContextualTypeForInitializerExpression(node, contextFlags) {
|
|
@@ -152135,9 +152140,12 @@ var SymbolObject = class {
|
|
|
152135
152140
|
return this.declarations;
|
|
152136
152141
|
}
|
|
152137
152142
|
getDocumentationComment(checker) {
|
|
152143
|
+
var _a, _b, _c, _d;
|
|
152138
152144
|
if (!this.documentationComment) {
|
|
152139
152145
|
this.documentationComment = emptyArray;
|
|
152140
|
-
if (!this.declarations && isTransientSymbol(this) && this.links.
|
|
152146
|
+
if (!this.declarations && isTransientSymbol(this) && this.links.checkFlags & 262144 /* Mapped */ && ((_a = this.parent) == null ? void 0 : _a.declarations) && some((_b = this.parent) == null ? void 0 : _b.declarations, (decl) => hasJSDocInheritDocTag(decl))) {
|
|
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) {
|
|
152141
152149
|
const labelDecl = this.links.target.links.tupleLabelDeclaration;
|
|
152142
152150
|
this.documentationComment = getDocumentationComment([labelDecl], checker);
|
|
152143
152151
|
} else {
|
|
@@ -174818,7 +174826,9 @@ function isExpandoDeclaration(node) {
|
|
|
174818
174826
|
return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */;
|
|
174819
174827
|
}
|
|
174820
174828
|
function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) {
|
|
174821
|
-
|
|
174829
|
+
var _a, _b;
|
|
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;
|
|
174822
174832
|
const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());
|
|
174823
174833
|
if (signatureDefinition) {
|
|
174824
174834
|
return signatureDefinition;
|
|
@@ -174855,10 +174865,10 @@ function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolutio
|
|
|
174855
174865
|
if (!signatureDeclarations) {
|
|
174856
174866
|
return void 0;
|
|
174857
174867
|
}
|
|
174858
|
-
const
|
|
174859
|
-
const declarationsWithBody =
|
|
174860
|
-
return
|
|
174861
|
-
last(
|
|
174868
|
+
const declarations2 = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike);
|
|
174869
|
+
const declarationsWithBody = declarations2.filter((d) => !!d.body);
|
|
174870
|
+
return declarations2.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo(
|
|
174871
|
+
last(declarations2),
|
|
174862
174872
|
typeChecker,
|
|
174863
174873
|
symbol,
|
|
174864
174874
|
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-61061-8",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|