Make @enum,@this tag construction stricter (#39791)

The type expression is required, so the type should reflect that.
This commit is contained in:
Nathan Shively-Sanders
2020-07-28 13:49:42 -07:00
committed by GitHub
parent 8f04f91ef5
commit 03b658035d
3 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -3165,12 +3165,12 @@ namespace ts {
export interface JSDocEnumTag extends JSDocTag, Declaration {
readonly kind: SyntaxKind.JSDocEnumTag;
readonly parent: JSDoc;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocThisTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocThisTag;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocTemplateTag extends JSDocTag {
@@ -6976,9 +6976,9 @@ namespace ts {
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag;
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag;
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag;
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag;
+6 -6
View File
@@ -1769,11 +1769,11 @@ declare namespace ts {
export interface JSDocEnumTag extends JSDocTag, Declaration {
readonly kind: SyntaxKind.JSDocEnumTag;
readonly parent: JSDoc;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocThisTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocThisTag;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocTemplateTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocTemplateTag;
@@ -3417,9 +3417,9 @@ declare namespace ts {
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag;
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag;
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag;
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag;
@@ -10419,7 +10419,7 @@ declare namespace ts {
/** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag;
/** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocThisTag;
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag;
/** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
@@ -10431,7 +10431,7 @@ declare namespace ts {
readonly expression: Identifier | PropertyAccessEntityNameExpression;
}, comment?: string | undefined) => JSDocAugmentsTag;
/** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocEnumTag;
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag;
/** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */
const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag;
/** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */
+6 -6
View File
@@ -1769,11 +1769,11 @@ declare namespace ts {
export interface JSDocEnumTag extends JSDocTag, Declaration {
readonly kind: SyntaxKind.JSDocEnumTag;
readonly parent: JSDoc;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocThisTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocThisTag;
readonly typeExpression?: JSDocTypeExpression;
readonly typeExpression: JSDocTypeExpression;
}
export interface JSDocTemplateTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocTemplateTag;
@@ -3417,9 +3417,9 @@ declare namespace ts {
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag;
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag;
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag;
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag;
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag;
@@ -6811,7 +6811,7 @@ declare namespace ts {
/** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag;
/** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocThisTag;
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag;
/** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
@@ -6823,7 +6823,7 @@ declare namespace ts {
readonly expression: Identifier | PropertyAccessEntityNameExpression;
}, comment?: string | undefined) => JSDocAugmentsTag;
/** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocEnumTag;
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag;
/** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */
const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag;
/** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */