mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add @linkcode and @linkplain tags (#44208)
* Add @linkcode and @linkplain tags They are just like @link tags but request fixed-width and normal presentation, respectively. Fixes #43935 * revert JSDocComment -> JSDoc SyntaxKind rename * update API baselines * fix lint
This commit is contained in:
@@ -39316,7 +39316,7 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const isJSDoc = findAncestor(name, or(isJSDocLink, isJSDocNameReference, isJSDocMemberName));
|
||||
const isJSDoc = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));
|
||||
const meaning = isJSDoc ? SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Value : SymbolFlags.Value;
|
||||
if (name.kind === SyntaxKind.Identifier) {
|
||||
if (isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
|
||||
|
||||
@@ -3785,7 +3785,7 @@ namespace ts {
|
||||
emit(tagName);
|
||||
}
|
||||
|
||||
function emitJSDocComment(comment: string | NodeArray<JSDocText | JSDocLink> | undefined) {
|
||||
function emitJSDocComment(comment: string | NodeArray<JSDocComment> | undefined) {
|
||||
const text = getTextOfJSDocComment(comment);
|
||||
if (text) {
|
||||
writeSpace();
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace ts {
|
||||
const getJSDocPrimaryTypeCreateFunction = memoizeOne(<T extends JSDocType>(kind: T["kind"]) => () => createJSDocPrimaryTypeWorker(kind));
|
||||
const getJSDocUnaryTypeCreateFunction = memoizeOne(<T extends JSDocType & { readonly type: TypeNode | undefined; }>(kind: T["kind"]) => (type: T["type"]) => createJSDocUnaryTypeWorker<T>(kind, type));
|
||||
const getJSDocUnaryTypeUpdateFunction = memoizeOne(<T extends JSDocType & { readonly type: TypeNode | undefined; }>(kind: T["kind"]) => (node: T, type: T["type"]) => updateJSDocUnaryTypeWorker<T>(kind, node, type));
|
||||
const getJSDocSimpleTagCreateFunction = memoizeOne(<T extends JSDocTag>(kind: T["kind"]) => (tagName: Identifier | undefined, comment?: NodeArray<JSDocText | JSDocLink>) => createJSDocSimpleTagWorker(kind, tagName, comment));
|
||||
const getJSDocSimpleTagUpdateFunction = memoizeOne(<T extends JSDocTag>(kind: T["kind"]) => (node: T, tagName: Identifier | undefined, comment?: NodeArray<JSDocText | JSDocLink>) => updateJSDocSimpleTagWorker(kind, node, tagName, comment));
|
||||
const getJSDocTypeLikeTagCreateFunction = memoizeOne(<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"]) => (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: NodeArray<JSDocText | JSDocLink>) => createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment));
|
||||
const getJSDocTypeLikeTagUpdateFunction = memoizeOne(<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"]) => (node: T, tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: NodeArray<JSDocText | JSDocLink>) => updateJSDocTypeLikeTagWorker(kind, node, tagName, typeExpression, comment));
|
||||
const getJSDocSimpleTagCreateFunction = memoizeOne(<T extends JSDocTag>(kind: T["kind"]) => (tagName: Identifier | undefined, comment?: NodeArray<JSDocComment>) => createJSDocSimpleTagWorker(kind, tagName, comment));
|
||||
const getJSDocSimpleTagUpdateFunction = memoizeOne(<T extends JSDocTag>(kind: T["kind"]) => (node: T, tagName: Identifier | undefined, comment?: NodeArray<JSDocComment>) => updateJSDocSimpleTagWorker(kind, node, tagName, comment));
|
||||
const getJSDocTypeLikeTagCreateFunction = memoizeOne(<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"]) => (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: NodeArray<JSDocComment>) => createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment));
|
||||
const getJSDocTypeLikeTagUpdateFunction = memoizeOne(<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"]) => (node: T, tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: NodeArray<JSDocComment>) => updateJSDocTypeLikeTagWorker(kind, node, tagName, typeExpression, comment));
|
||||
|
||||
const factory: NodeFactory = {
|
||||
get parenthesizer() { return parenthesizerRules(); },
|
||||
@@ -349,6 +349,10 @@ namespace ts {
|
||||
updateJSDocMemberName,
|
||||
createJSDocLink,
|
||||
updateJSDocLink,
|
||||
createJSDocLinkCode,
|
||||
updateJSDocLinkCode,
|
||||
createJSDocLinkPlain,
|
||||
updateJSDocLinkPlain,
|
||||
// lazily load factory members for JSDoc tags with similar structure
|
||||
get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction<JSDocTypeTag>(SyntaxKind.JSDocTypeTag); },
|
||||
get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction<JSDocTypeTag>(SyntaxKind.JSDocTypeTag); },
|
||||
@@ -4246,7 +4250,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createBaseJSDocTag<T extends JSDocTag>(kind: T["kind"], tagName: Identifier, comment: string | NodeArray<JSDocText | JSDocLink> | undefined) {
|
||||
function createBaseJSDocTag<T extends JSDocTag>(kind: T["kind"], tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined) {
|
||||
const node = createBaseNode<T>(kind);
|
||||
node.tagName = tagName;
|
||||
node.comment = comment;
|
||||
@@ -4254,7 +4258,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTemplateTag {
|
||||
function createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag {
|
||||
const node = createBaseJSDocTag<JSDocTemplateTag>(SyntaxKind.JSDocTemplateTag, tagName ?? createIdentifier("template"), comment);
|
||||
node.constraint = constraint;
|
||||
node.typeParameters = createNodeArray(typeParameters);
|
||||
@@ -4262,7 +4266,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier = getDefaultTagName(node), constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTemplateTag {
|
||||
function updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier = getDefaultTagName(node), constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.constraint !== constraint
|
||||
|| node.typeParameters !== typeParameters
|
||||
@@ -4272,7 +4276,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypedefTag {
|
||||
function createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag {
|
||||
const node = createBaseJSDocTag<JSDocTypedefTag>(SyntaxKind.JSDocTypedefTag, tagName ?? createIdentifier("typedef"), comment);
|
||||
node.typeExpression = typeExpression;
|
||||
node.fullName = fullName;
|
||||
@@ -4281,7 +4285,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocTypeExpression | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypedefTag {
|
||||
function updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocTypeExpression | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.typeExpression !== typeExpression
|
||||
|| node.fullName !== fullName
|
||||
@@ -4291,7 +4295,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocParameterTag {
|
||||
function createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag {
|
||||
const node = createBaseJSDocTag<JSDocParameterTag>(SyntaxKind.JSDocParameterTag, tagName ?? createIdentifier("param"), comment);
|
||||
node.typeExpression = typeExpression;
|
||||
node.name = name;
|
||||
@@ -4301,7 +4305,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier = getDefaultTagName(node), name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocParameterTag {
|
||||
function updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier = getDefaultTagName(node), name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.name !== name
|
||||
|| node.isBracketed !== isBracketed
|
||||
@@ -4313,7 +4317,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPropertyTag {
|
||||
function createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag {
|
||||
const node = createBaseJSDocTag<JSDocPropertyTag>(SyntaxKind.JSDocPropertyTag, tagName ?? createIdentifier("prop"), comment);
|
||||
node.typeExpression = typeExpression;
|
||||
node.name = name;
|
||||
@@ -4323,7 +4327,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier = getDefaultTagName(node), name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPropertyTag {
|
||||
function updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier = getDefaultTagName(node), name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.name !== name
|
||||
|| node.isBracketed !== isBracketed
|
||||
@@ -4335,7 +4339,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocCallbackTag {
|
||||
function createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag {
|
||||
const node = createBaseJSDocTag<JSDocCallbackTag>(SyntaxKind.JSDocCallbackTag, tagName ?? createIdentifier("callback"), comment);
|
||||
node.typeExpression = typeExpression;
|
||||
node.fullName = fullName;
|
||||
@@ -4344,7 +4348,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocCallbackTag {
|
||||
function updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.typeExpression !== typeExpression
|
||||
|| node.fullName !== fullName
|
||||
@@ -4354,14 +4358,14 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAugmentsTag {
|
||||
function createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag {
|
||||
const node = createBaseJSDocTag<JSDocAugmentsTag>(SyntaxKind.JSDocAugmentsTag, tagName ?? createIdentifier("augments"), comment);
|
||||
node.class = className;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier = getDefaultTagName(node), className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAugmentsTag {
|
||||
function updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier = getDefaultTagName(node), className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.class !== className
|
||||
|| node.comment !== comment
|
||||
@@ -4370,21 +4374,21 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocImplementsTag {
|
||||
function createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag {
|
||||
const node = createBaseJSDocTag<JSDocImplementsTag>(SyntaxKind.JSDocImplementsTag, tagName ?? createIdentifier("implements"), comment);
|
||||
node.class = className;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocSeeTag(tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag {
|
||||
function createJSDocSeeTag(tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag {
|
||||
const node = createBaseJSDocTag<JSDocSeeTag>(SyntaxKind.JSDocSeeTag, tagName ?? createIdentifier("see"), comment);
|
||||
node.name = name;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag {
|
||||
function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.name !== name
|
||||
|| node.comment !== comment
|
||||
@@ -4441,7 +4445,37 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier = getDefaultTagName(node), className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocImplementsTag {
|
||||
function createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode {
|
||||
const node = createBaseNode<JSDocLinkCode>(SyntaxKind.JSDocLinkCode);
|
||||
node.name = name;
|
||||
node.text = text;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode {
|
||||
return node.name !== name
|
||||
? update(createJSDocLinkCode(name, text), node)
|
||||
: node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain {
|
||||
const node = createBaseNode<JSDocLinkPlain>(SyntaxKind.JSDocLinkPlain);
|
||||
node.name = name;
|
||||
node.text = text;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain {
|
||||
return node.name !== name
|
||||
? update(createJSDocLinkPlain(name, text), node)
|
||||
: node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier = getDefaultTagName(node), className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.class !== className
|
||||
|| node.comment !== comment
|
||||
@@ -4457,7 +4491,7 @@ namespace ts {
|
||||
// createJSDocProtectedTag
|
||||
// createJSDocReadonlyTag
|
||||
// createJSDocDeprecatedTag
|
||||
function createJSDocSimpleTagWorker<T extends JSDocTag>(kind: T["kind"], tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>) {
|
||||
function createJSDocSimpleTagWorker<T extends JSDocTag>(kind: T["kind"], tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>) {
|
||||
const node = createBaseJSDocTag<T>(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment);
|
||||
return node;
|
||||
}
|
||||
@@ -4470,7 +4504,7 @@ namespace ts {
|
||||
// updateJSDocProtectedTag
|
||||
// updateJSDocReadonlyTag
|
||||
// updateJSDocDeprecatedTag
|
||||
function updateJSDocSimpleTagWorker<T extends JSDocTag>(kind: T["kind"], node: T, tagName: Identifier = getDefaultTagName(node), comment: string | NodeArray<JSDocText | JSDocLink> | undefined) {
|
||||
function updateJSDocSimpleTagWorker<T extends JSDocTag>(kind: T["kind"], node: T, tagName: Identifier = getDefaultTagName(node), comment: string | NodeArray<JSDocComment> | undefined) {
|
||||
return node.tagName !== tagName
|
||||
|| node.comment !== comment
|
||||
? update(createJSDocSimpleTagWorker(kind, tagName, comment), node) :
|
||||
@@ -4482,7 +4516,7 @@ namespace ts {
|
||||
// createJSDocReturnTag
|
||||
// createJSDocThisTag
|
||||
// createJSDocEnumTag
|
||||
function createJSDocTypeLikeTagWorker<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"], tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>) {
|
||||
function createJSDocTypeLikeTagWorker<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"], tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>) {
|
||||
const node = createBaseJSDocTag<T>(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment);
|
||||
node.typeExpression = typeExpression;
|
||||
return node;
|
||||
@@ -4493,7 +4527,7 @@ namespace ts {
|
||||
// updateJSDocReturnTag
|
||||
// updateJSDocThisTag
|
||||
// updateJSDocEnumTag
|
||||
function updateJSDocTypeLikeTagWorker<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"], node: T, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined) {
|
||||
function updateJSDocTypeLikeTagWorker<T extends JSDocTag & { typeExpression?: JSDocTypeExpression }>(kind: T["kind"], node: T, tagName: Identifier = getDefaultTagName(node), typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined) {
|
||||
return node.tagName !== tagName
|
||||
|| node.typeExpression !== typeExpression
|
||||
|| node.comment !== comment
|
||||
@@ -4502,13 +4536,13 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocUnknownTag {
|
||||
function createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag {
|
||||
const node = createBaseJSDocTag<JSDocUnknownTag>(SyntaxKind.JSDocTag, tagName, comment);
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocUnknownTag {
|
||||
function updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag {
|
||||
return node.tagName !== tagName
|
||||
|| node.comment !== comment
|
||||
? update(createJSDocUnknownTag(tagName, comment), node)
|
||||
@@ -4530,7 +4564,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined) {
|
||||
function createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) {
|
||||
const node = createBaseNode<JSDoc>(SyntaxKind.JSDocComment);
|
||||
node.comment = comment;
|
||||
node.tags = asNodeArray(tags);
|
||||
@@ -4538,7 +4572,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocText | JSDocLink> | undefined, tags: readonly JSDocTag[] | undefined) {
|
||||
function updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined) {
|
||||
return node.comment !== comment
|
||||
|| node.tags !== tags
|
||||
? update(createJSDocComment(comment, tags), node)
|
||||
|
||||
@@ -778,6 +778,14 @@ namespace ts {
|
||||
return node.kind === SyntaxKind.JSDocLink;
|
||||
}
|
||||
|
||||
export function isJSDocLinkCode(node: Node): node is JSDocLinkCode {
|
||||
return node.kind === SyntaxKind.JSDocLinkCode;
|
||||
}
|
||||
|
||||
export function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain {
|
||||
return node.kind === SyntaxKind.JSDocLinkPlain;
|
||||
}
|
||||
|
||||
export function isJSDocAllType(node: Node): node is JSDocAllType {
|
||||
return node.kind === SyntaxKind.JSDocAllType;
|
||||
}
|
||||
|
||||
+34
-24
@@ -481,12 +481,12 @@ namespace ts {
|
||||
return visitNodes(cbNode, cbNodes, (node as JSDocFunctionType).parameters) ||
|
||||
visitNode(cbNode, (node as JSDocFunctionType).type);
|
||||
case SyntaxKind.JSDocComment:
|
||||
return (typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined))
|
||||
return (typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined))
|
||||
|| visitNodes(cbNode, cbNodes, (node as JSDoc).tags);
|
||||
case SyntaxKind.JSDocSeeTag:
|
||||
return visitNode(cbNode, (node as JSDocSeeTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocSeeTag).name) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocNameReference:
|
||||
return visitNode(cbNode, (node as JSDocNameReference).name);
|
||||
case SyntaxKind.JSDocMemberName:
|
||||
@@ -498,54 +498,56 @@ namespace ts {
|
||||
((node as JSDocPropertyLikeTag).isNameFirst
|
||||
? visitNode(cbNode, (node as JSDocPropertyLikeTag).name) ||
|
||||
visitNode(cbNode, (node as JSDocPropertyLikeTag).typeExpression) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined))
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined))
|
||||
: visitNode(cbNode, (node as JSDocPropertyLikeTag).typeExpression) ||
|
||||
visitNode(cbNode, (node as JSDocPropertyLikeTag).name)) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocAuthorTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocImplementsTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocImplementsTag).class) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocAugmentsTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocAugmentsTag).class) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocTemplateTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocTemplateTag).constraint) ||
|
||||
visitNodes(cbNode, cbNodes, (node as JSDocTemplateTag).typeParameters) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocTypedefTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
((node as JSDocTypedefTag).typeExpression &&
|
||||
(node as JSDocTypedefTag).typeExpression!.kind === SyntaxKind.JSDocTypeExpression
|
||||
? visitNode(cbNode, (node as JSDocTypedefTag).typeExpression) ||
|
||||
visitNode(cbNode, (node as JSDocTypedefTag).fullName) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined))
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined))
|
||||
: visitNode(cbNode, (node as JSDocTypedefTag).fullName) ||
|
||||
visitNode(cbNode, (node as JSDocTypedefTag).typeExpression)) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocCallbackTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocCallbackTag).fullName) ||
|
||||
visitNode(cbNode, (node as JSDocCallbackTag).typeExpression) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocReturnTag:
|
||||
case SyntaxKind.JSDocTypeTag:
|
||||
case SyntaxKind.JSDocThisTag:
|
||||
case SyntaxKind.JSDocEnumTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName) ||
|
||||
visitNode(cbNode, (node as JSDocReturnTag | JSDocTypeTag | JSDocThisTag | JSDocEnumTag).typeExpression) ||
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
(typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.JSDocSignature:
|
||||
return forEach((node as JSDocSignature).typeParameters, cbNode) ||
|
||||
forEach((node as JSDocSignature).parameters, cbNode) ||
|
||||
visitNode(cbNode, (node as JSDocSignature).type);
|
||||
case SyntaxKind.JSDocLink:
|
||||
return visitNode(cbNode, (node as JSDocLink).name);
|
||||
case SyntaxKind.JSDocLinkCode:
|
||||
case SyntaxKind.JSDocLinkPlain:
|
||||
return visitNode(cbNode, (node as JSDocLink | JSDocLinkCode | JSDocLinkPlain).name);
|
||||
case SyntaxKind.JSDocTypeLiteral:
|
||||
return forEach((node as JSDocTypeLiteral).jsDocPropertyTags, cbNode);
|
||||
case SyntaxKind.JSDocTag:
|
||||
@@ -556,7 +558,7 @@ namespace ts {
|
||||
case SyntaxKind.JSDocReadonlyTag:
|
||||
case SyntaxKind.JSDocDeprecatedTag:
|
||||
return visitNode(cbNode, (node as JSDocTag).tagName)
|
||||
|| (typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocText | JSDocLink> | undefined));
|
||||
|| (typeof (node as JSDoc).comment === "string" ? undefined : visitNodes(cbNode, cbNodes, (node as JSDoc).comment as NodeArray<JSDocComment> | undefined));
|
||||
case SyntaxKind.PartiallyEmittedExpression:
|
||||
return visitNode(cbNode, (node as PartiallyEmittedExpression).expression);
|
||||
}
|
||||
@@ -7425,7 +7427,7 @@ namespace ts {
|
||||
let linkEnd: number;
|
||||
let commentsPos: number | undefined;
|
||||
let comments: string[] = [];
|
||||
const parts: (JSDocLink | JSDocText)[] = [];
|
||||
const parts: JSDocComment[] = [];
|
||||
|
||||
// + 3 for leading /**, - 5 in total for /** */
|
||||
return scanner.scanRange(start + 3, length - 5, () => {
|
||||
@@ -7681,10 +7683,10 @@ namespace ts {
|
||||
return parseTagComments(margin, indentText.slice(margin));
|
||||
}
|
||||
|
||||
function parseTagComments(indent: number, initialMargin?: string): string | NodeArray<JSDocText | JSDocLink> | undefined {
|
||||
function parseTagComments(indent: number, initialMargin?: string): string | NodeArray<JSDocComment> | undefined {
|
||||
const commentsPos = getNodePos();
|
||||
let comments: string[] = [];
|
||||
const parts: (JSDocLink | JSDocText)[] = [];
|
||||
const parts: JSDocComment[] = [];
|
||||
let linkEnd;
|
||||
let state = JSDocState.BeginningOfLine;
|
||||
let previousWhitespace = true;
|
||||
@@ -7800,7 +7802,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function parseJSDocLink(start: number) {
|
||||
if (!tryParse(parseJSDocLinkPrefix)) {
|
||||
const linkType = tryParse(parseJSDocLinkPrefix);
|
||||
if (!linkType) {
|
||||
return undefined;
|
||||
}
|
||||
nextTokenJSDoc(); // start at token after link, then skip any whitespace
|
||||
@@ -7822,15 +7825,22 @@ namespace ts {
|
||||
text.push(scanner.getTokenText());
|
||||
nextTokenJSDoc();
|
||||
}
|
||||
return finishNode(factory.createJSDocLink(name, text.join("")), start, scanner.getTextPos());
|
||||
const create = linkType === "link" ? factory.createJSDocLink
|
||||
: linkType === "linkcode" ? factory.createJSDocLinkCode
|
||||
: factory.createJSDocLinkPlain;
|
||||
return finishNode(create(name, text.join("")), start, scanner.getTextPos());
|
||||
}
|
||||
|
||||
function parseJSDocLinkPrefix() {
|
||||
skipWhitespaceOrAsterisk();
|
||||
return token() === SyntaxKind.OpenBraceToken
|
||||
if (token() === SyntaxKind.OpenBraceToken
|
||||
&& nextTokenJSDoc() === SyntaxKind.AtToken
|
||||
&& tokenIsIdentifierOrKeyword(nextTokenJSDoc())
|
||||
&& scanner.getTokenValue() === "link";
|
||||
&& tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
||||
const kind = scanner.getTokenValue();
|
||||
if(kind === "link" || kind === "linkcode" || kind === "linkplain") {
|
||||
return kind;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseUnknownTag(start: number, tagName: Identifier, indent: number, indentText: string) {
|
||||
@@ -7969,7 +7979,7 @@ namespace ts {
|
||||
commentEnd = scanner.getStartPos();
|
||||
}
|
||||
const allParts = typeof comments !== "string"
|
||||
? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments) as (JSDocText | JSDocLink)[], commentStart) // cast away readonly
|
||||
? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments) as JSDocComment[], commentStart) // cast away readonly
|
||||
: textOnly.text + comments;
|
||||
return finishNode(factory.createJSDocAuthorTag(tagName, allParts), start);
|
||||
}
|
||||
@@ -8030,7 +8040,7 @@ namespace ts {
|
||||
return node;
|
||||
}
|
||||
|
||||
function parseSimpleTag(start: number, createTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>) => JSDocTag, tagName: Identifier, margin: number, indentText: string): JSDocTag {
|
||||
function parseSimpleTag(start: number, createTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>) => JSDocTag, tagName: Identifier, margin: number, indentText: string): JSDocTag {
|
||||
return finishNode(createTag(tagName, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
|
||||
}
|
||||
|
||||
|
||||
+66
-46
@@ -378,6 +378,8 @@ namespace ts {
|
||||
JSDocTypeLiteral,
|
||||
JSDocSignature,
|
||||
JSDocLink,
|
||||
JSDocLinkCode,
|
||||
JSDocLinkPlain,
|
||||
JSDocTag,
|
||||
JSDocAugmentsTag,
|
||||
JSDocImplementsTag,
|
||||
@@ -3190,13 +3192,13 @@ namespace ts {
|
||||
readonly kind: SyntaxKind.JSDocComment;
|
||||
readonly parent: HasJSDoc;
|
||||
readonly tags?: NodeArray<JSDocTag>;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
|
||||
export interface JSDocTag extends Node {
|
||||
readonly parent: JSDoc | JSDocTypeLiteral;
|
||||
readonly tagName: Identifier;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
|
||||
export interface JSDocLink extends Node {
|
||||
@@ -3205,6 +3207,20 @@ namespace ts {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface JSDocLinkCode extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkCode;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface JSDocLinkPlain extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkPlain;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
|
||||
export interface JSDocText extends Node {
|
||||
readonly kind: SyntaxKind.JSDocText;
|
||||
text: string;
|
||||
@@ -7297,56 +7313,60 @@ namespace ts {
|
||||
updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName;
|
||||
createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
|
||||
updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
|
||||
createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
|
||||
updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
createJSDocText(text: string): JSDocText;
|
||||
updateJSDocText(node: JSDocText, text: string): JSDocText;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocText | JSDocLink> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
|
||||
//
|
||||
// JSX
|
||||
|
||||
@@ -1898,14 +1898,14 @@ namespace ts {
|
||||
while (node.parent.kind === SyntaxKind.QualifiedName) {
|
||||
node = node.parent;
|
||||
}
|
||||
return node.parent.kind === SyntaxKind.TypeQuery || isJSDocLink(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);
|
||||
return node.parent.kind === SyntaxKind.TypeQuery || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);
|
||||
case SyntaxKind.JSDocMemberName:
|
||||
while (isJSDocMemberName(node.parent)) {
|
||||
node = node.parent;
|
||||
}
|
||||
return node.parent.kind === SyntaxKind.TypeQuery || isJSDocLink(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);
|
||||
return node.parent.kind === SyntaxKind.TypeQuery || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);
|
||||
case SyntaxKind.Identifier:
|
||||
if (node.parent.kind === SyntaxKind.TypeQuery || isJSDocLink(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) {
|
||||
if (node.parent.kind === SyntaxKind.TypeQuery || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) {
|
||||
return true;
|
||||
}
|
||||
// falls through
|
||||
|
||||
@@ -901,9 +901,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
/** Gets the text of a jsdoc comment, flattening links to their text. */
|
||||
export function getTextOfJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink>) {
|
||||
export function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>) {
|
||||
return typeof comment === "string" ? comment
|
||||
: comment?.map(c =>
|
||||
// TODO: Other kinds here
|
||||
c.kind === SyntaxKind.JSDocText ? c.text : `{@link ${c.name ? entityNameToString(c.name) + " " : ""}${c.text}}`).join("");
|
||||
}
|
||||
|
||||
@@ -1875,7 +1876,7 @@ namespace ts {
|
||||
return node.kind === SyntaxKind.JSDocComment
|
||||
|| node.kind === SyntaxKind.JSDocNamepathType
|
||||
|| node.kind === SyntaxKind.JSDocText
|
||||
|| node.kind === SyntaxKind.JSDocLink
|
||||
|| isJSDocLinkLike(node)
|
||||
|| isJSDocTag(node)
|
||||
|| isJSDocTypeLiteral(node)
|
||||
|| isJSDocSignature(node);
|
||||
@@ -1968,5 +1969,8 @@ namespace ts {
|
||||
return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
}
|
||||
|
||||
export function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain {
|
||||
return node.kind === SyntaxKind.JSDocLink || node.kind === SyntaxKind.JSDocLinkCode || node.kind === SyntaxKind.JSDocLinkPlain;
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
|
||||
@@ -282,6 +282,7 @@ namespace ts.codefix {
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
cancellationToken: CancellationToken,
|
||||
|
||||
): void {
|
||||
const param = firstOrUndefined(setAccessorDeclaration.parameters);
|
||||
if (param && isIdentifier(setAccessorDeclaration.name) && isIdentifier(param.name)) {
|
||||
@@ -380,7 +381,7 @@ namespace ts.codefix {
|
||||
}
|
||||
|
||||
export function addJSDocTags(changes: textChanges.ChangeTracker, sourceFile: SourceFile, parent: HasJSDoc, newTags: readonly JSDocTag[]): void {
|
||||
const comments = flatMap(parent.jsDoc, j => typeof j.comment === "string" ? factory.createJSDocText(j.comment) : j.comment) as (JSDocText | JSDocLink)[];
|
||||
const comments = flatMap(parent.jsDoc, j => typeof j.comment === "string" ? factory.createJSDocText(j.comment) : j.comment) as JSDocComment[];
|
||||
const oldTags = flatMapToMutable(parent.jsDoc, j => j.tags);
|
||||
const unmergedNewTags = newTags.filter(newTag => !oldTags || !oldTags.some((tag, i) => {
|
||||
const merged = tryMergeJsdocTags(tag, newTag);
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace ts.JsDoc {
|
||||
return tags;
|
||||
}
|
||||
|
||||
function getDisplayPartsFromComment(comment: string | readonly (JSDocText | JSDocLink)[], checker: TypeChecker | undefined): SymbolDisplayPart[] {
|
||||
function getDisplayPartsFromComment(comment: string | readonly JSDocComment[], checker: TypeChecker | undefined): SymbolDisplayPart[] {
|
||||
if (typeof comment === "string") {
|
||||
return [textPart(comment)];
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace ts {
|
||||
else if (isDeclarationName(node)) {
|
||||
return getMeaningFromDeclaration(node.parent);
|
||||
}
|
||||
else if (isEntityName(node) && findAncestor(node, or(isJSDocNameReference, isJSDocLink, isJSDocMemberName))) {
|
||||
else if (isEntityName(node) && findAncestor(node, or(isJSDocNameReference, isJSDocLinkLike, isJSDocMemberName))) {
|
||||
return SemanticMeaning.All;
|
||||
}
|
||||
else if (isTypeReference(node)) {
|
||||
@@ -2233,8 +2233,11 @@ namespace ts {
|
||||
return displayPart(text, SymbolDisplayPartKind.link);
|
||||
}
|
||||
|
||||
export function buildLinkParts(link: JSDocLink, checker?: TypeChecker): SymbolDisplayPart[] {
|
||||
const parts = [linkPart("{@link ")];
|
||||
export function buildLinkParts(link: JSDocLink | JSDocLinkCode | JSDocLinkPlain, checker?: TypeChecker): SymbolDisplayPart[] {
|
||||
const prefix = isJSDocLink(link) ? "link"
|
||||
: isJSDocLinkCode(link) ? "linkcode"
|
||||
: "linkplain";
|
||||
const parts = [linkPart(`{@${prefix} `)];
|
||||
if (!link.name) {
|
||||
if (link.text) {parts.push(linkTextPart(link.text));}
|
||||
}
|
||||
|
||||
+118
-98
@@ -424,35 +424,37 @@ declare namespace ts {
|
||||
JSDocTypeLiteral = 316,
|
||||
JSDocSignature = 317,
|
||||
JSDocLink = 318,
|
||||
JSDocTag = 319,
|
||||
JSDocAugmentsTag = 320,
|
||||
JSDocImplementsTag = 321,
|
||||
JSDocAuthorTag = 322,
|
||||
JSDocDeprecatedTag = 323,
|
||||
JSDocClassTag = 324,
|
||||
JSDocPublicTag = 325,
|
||||
JSDocPrivateTag = 326,
|
||||
JSDocProtectedTag = 327,
|
||||
JSDocReadonlyTag = 328,
|
||||
JSDocOverrideTag = 329,
|
||||
JSDocCallbackTag = 330,
|
||||
JSDocEnumTag = 331,
|
||||
JSDocParameterTag = 332,
|
||||
JSDocReturnTag = 333,
|
||||
JSDocThisTag = 334,
|
||||
JSDocTypeTag = 335,
|
||||
JSDocTemplateTag = 336,
|
||||
JSDocTypedefTag = 337,
|
||||
JSDocSeeTag = 338,
|
||||
JSDocPropertyTag = 339,
|
||||
SyntaxList = 340,
|
||||
NotEmittedStatement = 341,
|
||||
PartiallyEmittedExpression = 342,
|
||||
CommaListExpression = 343,
|
||||
MergeDeclarationMarker = 344,
|
||||
EndOfDeclarationMarker = 345,
|
||||
SyntheticReferenceExpression = 346,
|
||||
Count = 347,
|
||||
JSDocLinkCode = 319,
|
||||
JSDocLinkPlain = 320,
|
||||
JSDocTag = 321,
|
||||
JSDocAugmentsTag = 322,
|
||||
JSDocImplementsTag = 323,
|
||||
JSDocAuthorTag = 324,
|
||||
JSDocDeprecatedTag = 325,
|
||||
JSDocClassTag = 326,
|
||||
JSDocPublicTag = 327,
|
||||
JSDocPrivateTag = 328,
|
||||
JSDocProtectedTag = 329,
|
||||
JSDocReadonlyTag = 330,
|
||||
JSDocOverrideTag = 331,
|
||||
JSDocCallbackTag = 332,
|
||||
JSDocEnumTag = 333,
|
||||
JSDocParameterTag = 334,
|
||||
JSDocReturnTag = 335,
|
||||
JSDocThisTag = 336,
|
||||
JSDocTypeTag = 337,
|
||||
JSDocTemplateTag = 338,
|
||||
JSDocTypedefTag = 339,
|
||||
JSDocSeeTag = 340,
|
||||
JSDocPropertyTag = 341,
|
||||
SyntaxList = 342,
|
||||
NotEmittedStatement = 343,
|
||||
PartiallyEmittedExpression = 344,
|
||||
CommaListExpression = 345,
|
||||
MergeDeclarationMarker = 346,
|
||||
EndOfDeclarationMarker = 347,
|
||||
SyntheticReferenceExpression = 348,
|
||||
Count = 349,
|
||||
FirstAssignment = 63,
|
||||
LastAssignment = 78,
|
||||
FirstCompoundAssignment = 64,
|
||||
@@ -481,9 +483,9 @@ declare namespace ts {
|
||||
LastStatement = 250,
|
||||
FirstNode = 159,
|
||||
FirstJSDocNode = 303,
|
||||
LastJSDocNode = 339,
|
||||
FirstJSDocTagNode = 319,
|
||||
LastJSDocTagNode = 339,
|
||||
LastJSDocNode = 341,
|
||||
FirstJSDocTagNode = 321,
|
||||
LastJSDocTagNode = 341,
|
||||
}
|
||||
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
||||
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
@@ -1758,18 +1760,29 @@ declare namespace ts {
|
||||
readonly kind: SyntaxKind.JSDocComment;
|
||||
readonly parent: HasJSDoc;
|
||||
readonly tags?: NodeArray<JSDocTag>;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
export interface JSDocTag extends Node {
|
||||
readonly parent: JSDoc | JSDocTypeLiteral;
|
||||
readonly tagName: Identifier;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
export interface JSDocLink extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLink;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export interface JSDocLinkCode extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkCode;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export interface JSDocLinkPlain extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkPlain;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
export interface JSDocText extends Node {
|
||||
readonly kind: SyntaxKind.JSDocText;
|
||||
text: string;
|
||||
@@ -3511,56 +3524,60 @@ declare namespace ts {
|
||||
updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName;
|
||||
createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
|
||||
updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
|
||||
createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
|
||||
updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
createJSDocText(text: string): JSDocText;
|
||||
updateJSDocText(node: JSDocText, text: string): JSDocText;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocText | JSDocLink> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
||||
updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
||||
createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
|
||||
@@ -4248,7 +4265,7 @@ declare namespace ts {
|
||||
/** Gets all JSDoc tags of a specified kind */
|
||||
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
|
||||
/** Gets the text of a jsdoc comment, flattening links to their text. */
|
||||
function getTextOfJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink>): string | undefined;
|
||||
function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined;
|
||||
/**
|
||||
* Gets the effective type parameters. If the node was parsed in a
|
||||
* JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
|
||||
@@ -4323,6 +4340,7 @@ declare namespace ts {
|
||||
function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
|
||||
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
||||
function isStringLiteralLike(node: Node): node is StringLiteralLike;
|
||||
function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
}
|
||||
declare namespace ts {
|
||||
const factory: NodeFactory;
|
||||
@@ -4570,6 +4588,8 @@ declare namespace ts {
|
||||
function isJSDocNameReference(node: Node): node is JSDocNameReference;
|
||||
function isJSDocMemberName(node: Node): node is JSDocMemberName;
|
||||
function isJSDocLink(node: Node): node is JSDocLink;
|
||||
function isJSDocLinkCode(node: Node): node is JSDocLinkCode;
|
||||
function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain;
|
||||
function isJSDocAllType(node: Node): node is JSDocAllType;
|
||||
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
|
||||
function isJSDocNullableType(node: Node): node is JSDocNullableType;
|
||||
@@ -10847,51 +10867,51 @@ declare namespace ts {
|
||||
/** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression;
|
||||
/** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTypeTag;
|
||||
const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypeTag;
|
||||
/** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocReturnTag;
|
||||
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReturnTag;
|
||||
/** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocThisTag;
|
||||
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocThisTag;
|
||||
/** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocComment: (comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
|
||||
const createJSDocComment: (comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
|
||||
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocParameterTag;
|
||||
const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocParameterTag;
|
||||
/** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocClassTag;
|
||||
const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocClassTag;
|
||||
/** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
||||
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
||||
}, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocAugmentsTag;
|
||||
}, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAugmentsTag;
|
||||
/** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocEnumTag;
|
||||
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | 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 | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTemplateTag;
|
||||
const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTemplateTag;
|
||||
/** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTypedefTag;
|
||||
const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypedefTag;
|
||||
/** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocCallbackTag;
|
||||
const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocCallbackTag;
|
||||
/** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature;
|
||||
/** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPropertyTag;
|
||||
const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPropertyTag;
|
||||
/** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral;
|
||||
/** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
||||
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
||||
}, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocImplementsTag;
|
||||
}, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocImplementsTag;
|
||||
/** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocAuthorTag;
|
||||
const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAuthorTag;
|
||||
/** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPublicTag;
|
||||
const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPublicTag;
|
||||
/** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPrivateTag;
|
||||
const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPrivateTag;
|
||||
/** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocProtectedTag;
|
||||
const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocProtectedTag;
|
||||
/** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocReadonlyTag;
|
||||
const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReadonlyTag;
|
||||
/** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocUnknownTag;
|
||||
const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocUnknownTag;
|
||||
/** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */
|
||||
const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
|
||||
/** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */
|
||||
|
||||
+118
-98
@@ -424,35 +424,37 @@ declare namespace ts {
|
||||
JSDocTypeLiteral = 316,
|
||||
JSDocSignature = 317,
|
||||
JSDocLink = 318,
|
||||
JSDocTag = 319,
|
||||
JSDocAugmentsTag = 320,
|
||||
JSDocImplementsTag = 321,
|
||||
JSDocAuthorTag = 322,
|
||||
JSDocDeprecatedTag = 323,
|
||||
JSDocClassTag = 324,
|
||||
JSDocPublicTag = 325,
|
||||
JSDocPrivateTag = 326,
|
||||
JSDocProtectedTag = 327,
|
||||
JSDocReadonlyTag = 328,
|
||||
JSDocOverrideTag = 329,
|
||||
JSDocCallbackTag = 330,
|
||||
JSDocEnumTag = 331,
|
||||
JSDocParameterTag = 332,
|
||||
JSDocReturnTag = 333,
|
||||
JSDocThisTag = 334,
|
||||
JSDocTypeTag = 335,
|
||||
JSDocTemplateTag = 336,
|
||||
JSDocTypedefTag = 337,
|
||||
JSDocSeeTag = 338,
|
||||
JSDocPropertyTag = 339,
|
||||
SyntaxList = 340,
|
||||
NotEmittedStatement = 341,
|
||||
PartiallyEmittedExpression = 342,
|
||||
CommaListExpression = 343,
|
||||
MergeDeclarationMarker = 344,
|
||||
EndOfDeclarationMarker = 345,
|
||||
SyntheticReferenceExpression = 346,
|
||||
Count = 347,
|
||||
JSDocLinkCode = 319,
|
||||
JSDocLinkPlain = 320,
|
||||
JSDocTag = 321,
|
||||
JSDocAugmentsTag = 322,
|
||||
JSDocImplementsTag = 323,
|
||||
JSDocAuthorTag = 324,
|
||||
JSDocDeprecatedTag = 325,
|
||||
JSDocClassTag = 326,
|
||||
JSDocPublicTag = 327,
|
||||
JSDocPrivateTag = 328,
|
||||
JSDocProtectedTag = 329,
|
||||
JSDocReadonlyTag = 330,
|
||||
JSDocOverrideTag = 331,
|
||||
JSDocCallbackTag = 332,
|
||||
JSDocEnumTag = 333,
|
||||
JSDocParameterTag = 334,
|
||||
JSDocReturnTag = 335,
|
||||
JSDocThisTag = 336,
|
||||
JSDocTypeTag = 337,
|
||||
JSDocTemplateTag = 338,
|
||||
JSDocTypedefTag = 339,
|
||||
JSDocSeeTag = 340,
|
||||
JSDocPropertyTag = 341,
|
||||
SyntaxList = 342,
|
||||
NotEmittedStatement = 343,
|
||||
PartiallyEmittedExpression = 344,
|
||||
CommaListExpression = 345,
|
||||
MergeDeclarationMarker = 346,
|
||||
EndOfDeclarationMarker = 347,
|
||||
SyntheticReferenceExpression = 348,
|
||||
Count = 349,
|
||||
FirstAssignment = 63,
|
||||
LastAssignment = 78,
|
||||
FirstCompoundAssignment = 64,
|
||||
@@ -481,9 +483,9 @@ declare namespace ts {
|
||||
LastStatement = 250,
|
||||
FirstNode = 159,
|
||||
FirstJSDocNode = 303,
|
||||
LastJSDocNode = 339,
|
||||
FirstJSDocTagNode = 319,
|
||||
LastJSDocTagNode = 339,
|
||||
LastJSDocNode = 341,
|
||||
FirstJSDocTagNode = 321,
|
||||
LastJSDocTagNode = 341,
|
||||
}
|
||||
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
||||
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
@@ -1758,18 +1760,29 @@ declare namespace ts {
|
||||
readonly kind: SyntaxKind.JSDocComment;
|
||||
readonly parent: HasJSDoc;
|
||||
readonly tags?: NodeArray<JSDocTag>;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
export interface JSDocTag extends Node {
|
||||
readonly parent: JSDoc | JSDocTypeLiteral;
|
||||
readonly tagName: Identifier;
|
||||
readonly comment?: string | NodeArray<JSDocText | JSDocLink>;
|
||||
readonly comment?: string | NodeArray<JSDocComment>;
|
||||
}
|
||||
export interface JSDocLink extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLink;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export interface JSDocLinkCode extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkCode;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export interface JSDocLinkPlain extends Node {
|
||||
readonly kind: SyntaxKind.JSDocLinkPlain;
|
||||
readonly name?: EntityName | JSDocMemberName;
|
||||
text: string;
|
||||
}
|
||||
export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
export interface JSDocText extends Node {
|
||||
readonly kind: SyntaxKind.JSDocText;
|
||||
text: string;
|
||||
@@ -3511,56 +3524,60 @@ declare namespace ts {
|
||||
updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName;
|
||||
createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
||||
createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
||||
createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
||||
createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
|
||||
updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
|
||||
createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
|
||||
updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocText | JSDocLink> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink>): JSDocOverrideTag;
|
||||
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag;
|
||||
updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag;
|
||||
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag;
|
||||
updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag;
|
||||
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag;
|
||||
updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag;
|
||||
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag;
|
||||
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag;
|
||||
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag;
|
||||
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag;
|
||||
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
||||
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag;
|
||||
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag;
|
||||
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag;
|
||||
updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag;
|
||||
createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag;
|
||||
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
|
||||
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
|
||||
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
|
||||
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
|
||||
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
|
||||
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
|
||||
updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag;
|
||||
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag;
|
||||
updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag;
|
||||
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag;
|
||||
updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag;
|
||||
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag;
|
||||
updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag;
|
||||
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag;
|
||||
updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag;
|
||||
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag;
|
||||
updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag;
|
||||
createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag;
|
||||
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
|
||||
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
||||
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
|
||||
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
||||
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
||||
createJSDocText(text: string): JSDocText;
|
||||
updateJSDocText(node: JSDocText, text: string): JSDocText;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocText | JSDocLink> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
||||
updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
||||
createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
||||
updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
||||
createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
|
||||
@@ -4248,7 +4265,7 @@ declare namespace ts {
|
||||
/** Gets all JSDoc tags of a specified kind */
|
||||
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
|
||||
/** Gets the text of a jsdoc comment, flattening links to their text. */
|
||||
function getTextOfJSDocComment(comment?: string | NodeArray<JSDocText | JSDocLink>): string | undefined;
|
||||
function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined;
|
||||
/**
|
||||
* Gets the effective type parameters. If the node was parsed in a
|
||||
* JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
|
||||
@@ -4323,6 +4340,7 @@ declare namespace ts {
|
||||
function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
|
||||
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
||||
function isStringLiteralLike(node: Node): node is StringLiteralLike;
|
||||
function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
||||
}
|
||||
declare namespace ts {
|
||||
const factory: NodeFactory;
|
||||
@@ -4570,6 +4588,8 @@ declare namespace ts {
|
||||
function isJSDocNameReference(node: Node): node is JSDocNameReference;
|
||||
function isJSDocMemberName(node: Node): node is JSDocMemberName;
|
||||
function isJSDocLink(node: Node): node is JSDocLink;
|
||||
function isJSDocLinkCode(node: Node): node is JSDocLinkCode;
|
||||
function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain;
|
||||
function isJSDocAllType(node: Node): node is JSDocAllType;
|
||||
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
|
||||
function isJSDocNullableType(node: Node): node is JSDocNullableType;
|
||||
@@ -7085,51 +7105,51 @@ declare namespace ts {
|
||||
/** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression;
|
||||
/** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTypeTag;
|
||||
const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypeTag;
|
||||
/** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocReturnTag;
|
||||
const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReturnTag;
|
||||
/** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocThisTag;
|
||||
const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocThisTag;
|
||||
/** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocComment: (comment?: string | NodeArray<JSDocText | JSDocLink> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
|
||||
const createJSDocComment: (comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
|
||||
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocParameterTag;
|
||||
const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocParameterTag;
|
||||
/** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocClassTag;
|
||||
const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocClassTag;
|
||||
/** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
||||
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
||||
}, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocAugmentsTag;
|
||||
}, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAugmentsTag;
|
||||
/** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocEnumTag;
|
||||
const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | 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 | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTemplateTag;
|
||||
const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTemplateTag;
|
||||
/** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocTypedefTag;
|
||||
const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypedefTag;
|
||||
/** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocCallbackTag;
|
||||
const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocCallbackTag;
|
||||
/** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature;
|
||||
/** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPropertyTag;
|
||||
const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPropertyTag;
|
||||
/** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral;
|
||||
/** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
||||
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
||||
}, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocImplementsTag;
|
||||
}, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocImplementsTag;
|
||||
/** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocAuthorTag;
|
||||
const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAuthorTag;
|
||||
/** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPublicTag;
|
||||
const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPublicTag;
|
||||
/** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocPrivateTag;
|
||||
const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPrivateTag;
|
||||
/** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocProtectedTag;
|
||||
const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocProtectedTag;
|
||||
/** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocReadonlyTag;
|
||||
const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReadonlyTag;
|
||||
/** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */
|
||||
const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocText | JSDocLink> | undefined) => JSDocUnknownTag;
|
||||
const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocUnknownTag;
|
||||
/** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */
|
||||
const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
|
||||
/** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */
|
||||
|
||||
@@ -0,0 +1,876 @@
|
||||
// === /tests/cases/fourslash/findAllReferencesLinkTag3.ts ===
|
||||
// namespace NPR {
|
||||
// export class Consider {
|
||||
// This = class {
|
||||
// show() { }
|
||||
// }
|
||||
// [|m|]/*FIND ALL REFS*/() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkcode Consider.prototype.[|m|]}
|
||||
// * {@linkplain Consider#[|m|]}
|
||||
// * {@linkcode Consider#This#show}
|
||||
// * {@linkplain Consider.This.show}
|
||||
// * {@linkcode NPR.Consider#This#show}
|
||||
// * {@linkplain NPR.Consider.This#show}
|
||||
// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.This.show}
|
||||
// */
|
||||
// export function ref() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkplain NPR.Consider#This#show hello hello}
|
||||
// * {@linkplain NPR.Consider.This#show}
|
||||
// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.This.show}
|
||||
// */
|
||||
// export function outerref() { }
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"kind": "method",
|
||||
"name": "(method) NPR.Consider.m(): void",
|
||||
"textSpan": {
|
||||
"start": 108,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "NPR",
|
||||
"kind": "moduleName"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "Consider",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "m",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 108,
|
||||
"length": 7
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 108,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"contextSpan": {
|
||||
"start": 108,
|
||||
"length": 7
|
||||
},
|
||||
"isWriteAccess": true,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 167,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 198,
|
||||
"length": 1
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// === /tests/cases/fourslash/findAllReferencesLinkTag3.ts ===
|
||||
// namespace NPR {
|
||||
// export class Consider {
|
||||
// This = class {
|
||||
// [|show|]/*FIND ALL REFS*/() { }
|
||||
// }
|
||||
// m() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkcode Consider.prototype.m}
|
||||
// * {@linkplain Consider#m}
|
||||
// * {@linkcode Consider#This#[|show|]}
|
||||
// * {@linkplain Consider.This.[|show|]}
|
||||
// * {@linkcode NPR.Consider#This#[|show|]}
|
||||
// * {@linkplain NPR.Consider.This#[|show|]}
|
||||
// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.This.[|show|]}
|
||||
// */
|
||||
// export function ref() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkplain NPR.Consider#This#[|show|] hello hello}
|
||||
// * {@linkplain NPR.Consider.This#[|show|]}
|
||||
// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.This.[|show|]}
|
||||
// */
|
||||
// export function outerref() { }
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"kind": "method",
|
||||
"name": "(method) (Anonymous class).show(): void",
|
||||
"textSpan": {
|
||||
"start": 79,
|
||||
"length": 4
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "(Anonymous class)",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "show",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 79,
|
||||
"length": 10
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 79,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"contextSpan": {
|
||||
"start": 79,
|
||||
"length": 10
|
||||
},
|
||||
"isWriteAccess": true,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 233,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 272,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 314,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 357,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 468,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 551,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 602,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 705,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// === /tests/cases/fourslash/findAllReferencesLinkTag3.ts ===
|
||||
// namespace NPR {
|
||||
// export class Consider {
|
||||
// [|This|]/*FIND ALL REFS*/ = class {
|
||||
// show() { }
|
||||
// }
|
||||
// m() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkcode Consider.prototype.m}
|
||||
// * {@linkplain Consider#m}
|
||||
// * {@linkcode Consider#[|This|]#show}
|
||||
// * {@linkplain Consider.[|This|].show}
|
||||
// * {@linkcode NPR.Consider#[|This|]#show}
|
||||
// * {@linkplain NPR.Consider.[|This|]#show}
|
||||
// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.[|This|].show}
|
||||
// */
|
||||
// export function ref() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkplain NPR.Consider#[|This|]#show hello hello}
|
||||
// * {@linkplain NPR.Consider.[|This|]#show}
|
||||
// * {@linkcode NPR.Consider#[|This|].show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.Consider.[|This|].show}
|
||||
// */
|
||||
// export function outerref() { }
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"kind": "property",
|
||||
"name": "(property) NPR.Consider.This: typeof (Anonymous class)",
|
||||
"textSpan": {
|
||||
"start": 52,
|
||||
"length": 4
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "property",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "NPR",
|
||||
"kind": "moduleName"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "Consider",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "This",
|
||||
"kind": "propertyName"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "typeof",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "(Anonymous class)",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 52,
|
||||
"length": 47
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 52,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"contextSpan": {
|
||||
"start": 52,
|
||||
"length": 47
|
||||
},
|
||||
"isWriteAccess": true,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 228,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 267,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 309,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 352,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 394,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 463,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 546,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 597,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 635,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 700,
|
||||
"length": 4
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// === /tests/cases/fourslash/findAllReferencesLinkTag3.ts ===
|
||||
// namespace NPR {
|
||||
// export class [|Consider|]/*FIND ALL REFS*/ {
|
||||
// This = class {
|
||||
// show() { }
|
||||
// }
|
||||
// m() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkcode [|Consider|].prototype.m}
|
||||
// * {@linkplain [|Consider|]#m}
|
||||
// * {@linkcode [|Consider|]#This#show}
|
||||
// * {@linkplain [|Consider|].This.show}
|
||||
// * {@linkcode NPR.[|Consider|]#This#show}
|
||||
// * {@linkplain NPR.[|Consider|].This#show}
|
||||
// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.[|Consider|].This.show}
|
||||
// */
|
||||
// export function ref() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkplain NPR.[|Consider|]#This#show hello hello}
|
||||
// * {@linkplain NPR.[|Consider|].This#show}
|
||||
// * {@linkcode NPR.[|Consider|]#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode NPR.[|Consider|].This.show}
|
||||
// */
|
||||
// export function outerref() { }
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"kind": "class",
|
||||
"name": "class NPR.Consider",
|
||||
"textSpan": {
|
||||
"start": 33,
|
||||
"length": 8
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "NPR",
|
||||
"kind": "moduleName"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "Consider",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 20,
|
||||
"length": 101
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 33,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"contextSpan": {
|
||||
"start": 20,
|
||||
"length": 101
|
||||
},
|
||||
"isWriteAccess": true,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 148,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 189,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 219,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 258,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 300,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 343,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 385,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 454,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 537,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 588,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 626,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 691,
|
||||
"length": 8
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// === /tests/cases/fourslash/findAllReferencesLinkTag3.ts ===
|
||||
// namespace [|NPR|]/*FIND ALL REFS*/ {
|
||||
// export class Consider {
|
||||
// This = class {
|
||||
// show() { }
|
||||
// }
|
||||
// m() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkcode Consider.prototype.m}
|
||||
// * {@linkplain Consider#m}
|
||||
// * {@linkcode Consider#This#show}
|
||||
// * {@linkplain Consider.This.show}
|
||||
// * {@linkcode [|NPR|].Consider#This#show}
|
||||
// * {@linkplain [|NPR|].Consider.This#show}
|
||||
// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode [|NPR|].Consider.This.show}
|
||||
// */
|
||||
// export function ref() { }
|
||||
// }
|
||||
// /**
|
||||
// * {@linkplain [|NPR|].Consider#This#show hello hello}
|
||||
// * {@linkplain [|NPR|].Consider.This#show}
|
||||
// * {@linkcode [|NPR|].Consider#This.show} # doesn't parse trailing .
|
||||
// * {@linkcode [|NPR|].Consider.This.show}
|
||||
// */
|
||||
// export function outerref() { }
|
||||
|
||||
[
|
||||
{
|
||||
"definition": {
|
||||
"containerKind": "",
|
||||
"containerName": "",
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"kind": "module",
|
||||
"name": "namespace NPR",
|
||||
"textSpan": {
|
||||
"start": 10,
|
||||
"length": 3
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "namespace",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "NPR",
|
||||
"kind": "moduleName"
|
||||
}
|
||||
],
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 513
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 10,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"contextSpan": {
|
||||
"start": 0,
|
||||
"length": 513
|
||||
},
|
||||
"isWriteAccess": true,
|
||||
"isDefinition": true
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 296,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 339,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 381,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 450,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 533,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 584,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 622,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
},
|
||||
{
|
||||
"textSpan": {
|
||||
"start": 687,
|
||||
"length": 3
|
||||
},
|
||||
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag3.ts",
|
||||
"isWriteAccess": false,
|
||||
"isDefinition": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,111 @@
|
||||
[
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/quickInfoLinkCodePlain.ts",
|
||||
"position": 210,
|
||||
"name": ""
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "deprecated",
|
||||
"textSpan": {
|
||||
"start": 209,
|
||||
"length": 1
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "C",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "m",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "deprecated",
|
||||
"text": [
|
||||
{
|
||||
"text": "Use ",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": "{@linkplain ",
|
||||
"kind": "link"
|
||||
},
|
||||
{
|
||||
"text": "PerspectiveCamera#setFocalLength .setFocalLength()",
|
||||
"kind": "linkText"
|
||||
},
|
||||
{
|
||||
"text": "}",
|
||||
"kind": "link"
|
||||
},
|
||||
{
|
||||
"text": " and ",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": "{@linkcode ",
|
||||
"kind": "link"
|
||||
},
|
||||
{
|
||||
"text": "PerspectiveCamera#filmGauge .filmGauge",
|
||||
"kind": "linkText"
|
||||
},
|
||||
{
|
||||
"text": "}",
|
||||
"kind": "link"
|
||||
},
|
||||
{
|
||||
"text": " instead.",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
//// namespace NPR/*5*/ {
|
||||
//// export class Consider/*4*/ {
|
||||
//// This/*3*/ = class {
|
||||
//// show/*2*/() { }
|
||||
//// }
|
||||
//// m/*1*/() { }
|
||||
//// }
|
||||
//// /**
|
||||
//// * {@linkcode Consider.prototype.m}
|
||||
//// * {@linkplain Consider#m}
|
||||
//// * {@linkcode Consider#This#show}
|
||||
//// * {@linkplain Consider.This.show}
|
||||
//// * {@linkcode NPR.Consider#This#show}
|
||||
//// * {@linkplain NPR.Consider.This#show}
|
||||
//// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
//// * {@linkcode NPR.Consider.This.show}
|
||||
//// */
|
||||
//// export function ref() { }
|
||||
//// }
|
||||
//// /**
|
||||
//// * {@linkplain NPR.Consider#This#show hello hello}
|
||||
//// * {@linkplain NPR.Consider.This#show}
|
||||
//// * {@linkcode NPR.Consider#This.show} # doesn't parse trailing .
|
||||
//// * {@linkcode NPR.Consider.This.show}
|
||||
//// */
|
||||
//// export function outerref() { }
|
||||
verify.baselineFindAllReferences('1', '2', '3', '4', '5')
|
||||
@@ -0,0 +1,12 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
//// export class C {
|
||||
//// /**
|
||||
//// * @deprecated Use {@linkplain PerspectiveCamera#setFocalLength .setFocalLength()} and {@linkcode PerspectiveCamera#filmGauge .filmGauge} instead.
|
||||
//// */
|
||||
//// m() { }
|
||||
//// }
|
||||
//// new C().m/**/
|
||||
|
||||
verify.noErrors()
|
||||
verify.baselineQuickInfo();
|
||||
Reference in New Issue
Block a user