@@ -4708,8 +4708,8 @@ namespace ts {
47084708 if (declaration.kind === SyntaxKind.ExportAssignment) {
47094709 return links.type = checkExpression((<ExportAssignment>declaration).expression);
47104710 }
4711- if (isInJavaScriptFile(declaration) && isJSDocPropertyLikeTag(declaration) && declaration.typeExpression ) {
4712- return links.type = getTypeFromTypeNode(declaration.typeExpression .type);
4711+ if (isInJavaScriptFile(declaration) && isJSDocPropertyLikeTag(declaration) && declaration.type ) {
4712+ return links.type = getTypeFromTypeNode(declaration.type .type);
47134713 }
47144714 // Handle variable, parameter or property
47154715 if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) {
@@ -6911,8 +6911,8 @@ namespace ts {
69116911 return isInJavaScriptFile(node) && (
69126912 // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType
69136913 node.type && node.type.kind === SyntaxKind.JSDocOptionalType
6914- || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) =>
6915- isBracketed || !!typeExpression && typeExpression .type.kind === SyntaxKind.JSDocOptionalType));
6914+ || getJSDocParameterTags(node).some(({ isBracketed, type }) =>
6915+ isBracketed || !!type && type .type.kind === SyntaxKind.JSDocOptionalType));
69166916 }
69176917
69186918 function tryFindAmbientModule(moduleName: string, withAugmentations: boolean) {
@@ -7105,7 +7105,7 @@ namespace ts {
71057105 const lastParam = lastOrUndefined(declaration.parameters);
71067106 const lastParamTags = lastParam ? getJSDocParameterTags(lastParam) : getJSDocTags(declaration).filter(isJSDocParameterTag);
71077107 const lastParamVariadicType = firstDefined(lastParamTags, p =>
7108- p.typeExpression && isJSDocVariadicType(p.typeExpression .type) ? p.typeExpression .type : undefined);
7108+ p.type && isJSDocVariadicType(p.type .type) ? p.type .type : undefined);
71097109
71107110 const syntheticArgsSymbol = createSymbol(SymbolFlags.Variable, "args" as __String);
71117111 syntheticArgsSymbol.type = lastParamVariadicType ? createArrayType(getTypeFromTypeNode(lastParamVariadicType.type)) : anyArrayType;
@@ -15166,7 +15166,7 @@ namespace ts {
1516615166 case SyntaxKind.ParenthesizedExpression: {
1516715167 // Like in `checkParenthesizedExpression`, an `/** @type {xyz} */` comment before a parenthesized expression acts as a type cast.
1516815168 const tag = isInJavaScriptFile(parent) ? getJSDocTypeTag(parent) : undefined;
15169- return tag ? getTypeFromTypeNode(tag.typeExpression .type) : getContextualType(<ParenthesizedExpression>parent);
15169+ return tag ? getTypeFromTypeNode(tag.type .type) : getContextualType(<ParenthesizedExpression>parent);
1517015170 }
1517115171 case SyntaxKind.JsxExpression:
1517215172 return getContextualTypeForJsxExpression(<JsxExpression>parent);
@@ -20465,7 +20465,7 @@ namespace ts {
2046520465 function checkParenthesizedExpression(node: ParenthesizedExpression, checkMode?: CheckMode): Type {
2046620466 const tag = isInJavaScriptFile(node) ? getJSDocTypeTag(node) : undefined;
2046720467 if (tag) {
20468- return checkAssertionWorker(tag, tag.typeExpression .type, node.expression, checkMode);
20468+ return checkAssertionWorker(tag, tag.type .type, node.expression, checkMode);
2046920469 }
2047020470 return checkExpression(node.expression, checkMode);
2047120471 }
@@ -22147,7 +22147,7 @@ namespace ts {
2214722147
2214822148 function checkJSDocTypedefTag(node: JSDocTypedefTag) {
2214922149 if (!node.type) {
22150- // If the node had `@property` tags, `typeExpression ` would have been set to the first property tag.
22150+ // If the node had `@property` tags, `type ` would have been set to the first property tag.
2215122151 error(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags);
2215222152 }
2215322153
@@ -22158,7 +22158,7 @@ namespace ts {
2215822158 }
2215922159
2216022160 function checkJSDocParameterTag(node: JSDocParameterTag) {
22161- checkSourceElement(node.typeExpression );
22161+ checkSourceElement(node.type );
2216222162 if (!getParameterSymbolFromJSDoc(node)) {
2216322163 const decl = getHostSignatureFromJSDoc(node);
2216422164 // don't issue an error for invalid hosts -- just functions --
@@ -22175,8 +22175,8 @@ namespace ts {
2217522175 idText(node.name.kind === SyntaxKind.QualifiedName ? node.name.right : node.name));
2217622176 }
2217722177 else if (findLast(getJSDocTags(decl), isJSDocParameterTag) === node &&
22178- node.typeExpression && node.typeExpression .type &&
22179- !isArrayType(getTypeFromTypeNode(node.typeExpression .type))) {
22178+ node.type && node.type .type &&
22179+ !isArrayType(getTypeFromTypeNode(node.type .type))) {
2218022180 error(node.name,
2218122181 Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,
2218222182 idText(node.name.kind === SyntaxKind.QualifiedName ? node.name.right : node.name));
0 commit comments