Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(41825): JSDoc equivalent of import * #57207

Merged
merged 32 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
953e54b
feat(41825): add importType jsdoc tag
a-tarasyuk Jan 28, 2024
b67cba6
add jsdocImportTypeTag parsing tests
a-tarasyuk Jan 29, 2024
fc4ac15
update baseline
a-tarasyuk Jan 29, 2024
df23ce3
add jsdoc import type tag go to definition tests
a-tarasyuk Jan 29, 2024
0b0029d
jsdoc import type completions
a-tarasyuk Jan 30, 2024
0a20ad3
jsdoc import type find-all-refs/rename
a-tarasyuk Jan 30, 2024
386120f
rename importType to import
a-tarasyuk Jan 31, 2024
08806b6
add tests
a-tarasyuk Feb 1, 2024
d629693
auto import fix to existing jsdoc imports
a-tarasyuk Feb 1, 2024
6ec3b27
cleanup
a-tarasyuk Feb 2, 2024
ad24624
handle multiline import clause
a-tarasyuk Feb 3, 2024
26f633f
add tests
a-tarasyuk Feb 3, 2024
82f79be
cleanup
a-tarasyuk Feb 7, 2024
a76450e
add additional import tag parsing test
a-tarasyuk Feb 8, 2024
9003fbf
add additional import tag parsing tests
a-tarasyuk Feb 8, 2024
5a6cb6b
handle jsdoc import tags in convert import refactoring
a-tarasyuk Feb 8, 2024
67caac1
add additional tests
a-tarasyuk Feb 8, 2024
f7da8be
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Feb 12, 2024
dd2a481
add import attrs to import tag. add additional tests
a-tarasyuk Feb 13, 2024
af9bc71
emit import declarations
a-tarasyuk Mar 1, 2024
5bbe7e7
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 1, 2024
7caacbd
emit type only imports
a-tarasyuk Mar 2, 2024
340ea99
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 7, 2024
e28ff89
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 16, 2024
2e4b90d
fix types
a-tarasyuk Mar 16, 2024
d37f70c
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 18, 2024
6bd9d73
always display errors for JSDoc imports in import attributes
a-tarasyuk Mar 18, 2024
aa9600d
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 18, 2024
32bbf4c
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 20, 2024
0da4e23
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 21, 2024
51f902e
Merge branch 'main' of https://github.com/microsoft/TypeScript into f…
a-tarasyuk Mar 26, 2024
653955e
add tests
a-tarasyuk Mar 26, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename importType to import
  • Loading branch information
a-tarasyuk committed Jan 31, 2024
commit 386120f00f5505bbe0b72798614efda813d71e64
16 changes: 8 additions & 8 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
AmbientModuleDeclaration,
and,
AnonymousType,
AnyImportOrJsDocImportTypeImport,
AnyImportOrJsDocImport,
AnyImportOrReExport,
append,
appendIfUnique,
Expand Down Expand Up @@ -583,7 +583,7 @@ import {
isJSDocCallbackTag,
isJSDocConstructSignature,
isJSDocFunctionType,
isJSDocImportTypeTag,
isJSDocImportTag,
isJSDocIndexSignature,
isJSDocLinkLike,
isJSDocMemberName,
Expand Down Expand Up @@ -771,7 +771,7 @@ import {
JSDocEnumTag,
JSDocFunctionType,
JSDocImplementsTag,
JSDocImportTypeTag,
JSDocImportTag,
JSDocLink,
JSDocLinkCode,
JSDocLinkPlain,
Expand Down Expand Up @@ -3944,7 +3944,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|| (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || (getFunctionFlags(n) & FunctionFlags.AsyncGenerator)) ? "quit" : false));
}

function getAnyImportSyntax(node: Node): AnyImportOrJsDocImportTypeImport | undefined {
function getAnyImportSyntax(node: Node): AnyImportOrJsDocImport | undefined {
switch (node.kind) {
case SyntaxKind.ImportEqualsDeclaration:
return node as ImportEqualsDeclaration;
Expand Down Expand Up @@ -4282,8 +4282,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
}

function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration | JSDocImportTypeTag, specifier: ImportOrExportSpecifier | BindingElement | PropertyAccessExpression, dontResolveAlias = false): Symbol | undefined {
const moduleSpecifier = getExternalModuleRequireArgument(node) || (node as ImportDeclaration | ExportDeclaration | JSDocImportTypeTag).moduleSpecifier!;
function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration | JSDocImportTag, specifier: ImportOrExportSpecifier | BindingElement | PropertyAccessExpression, dontResolveAlias = false): Symbol | undefined {
const moduleSpecifier = getExternalModuleRequireArgument(node) || (node as ImportDeclaration | ExportDeclaration | JSDocImportTag).moduleSpecifier!;
const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier)!; // TODO: GH#18217
const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name;
if (!isIdentifier(name)) {
Expand Down Expand Up @@ -5008,7 +5008,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
? location
: (isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : undefined)?.name ||
(isLiteralImportTypeNode(location) ? location : undefined)?.argument.literal ||
(isInJSFile(location) && isJSDocImportTypeTag(location) ? location.moduleSpecifier : undefined) ||
(isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : undefined) ||
(isVariableDeclaration(location) && location.initializer && isRequireCall(location.initializer, /*requireStringLiteralLikeArgument*/ true) ? location.initializer.arguments[0] : undefined) ||
findAncestor(location, isImportCall)?.arguments[0] ||
findAncestor(location, isImportDeclaration)?.moduleSpecifier ||
Expand Down Expand Up @@ -47625,7 +47625,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (
(isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
((node.parent.kind === SyntaxKind.ImportDeclaration || node.parent.kind === SyntaxKind.ExportDeclaration) && (node.parent as ImportDeclaration).moduleSpecifier === node) ||
(isInJSFile(node) && isJSDocImportTypeTag(node.parent) && node.parent.moduleSpecifier === node) ||
(isInJSFile(node) && isJSDocImportTag(node.parent) && node.parent.moduleSpecifier === node) ||
((isInJSFile(node) && isRequireCall(node.parent, /*requireStringLiteralLikeArgument*/ false)) || isImportCall(node.parent)) ||
(isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)
) {
Expand Down
8 changes: 4 additions & 4 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ import {
JSDocEnumTag,
JSDocFunctionType,
JSDocImplementsTag,
JSDocImportTypeTag,
JSDocImportTag,
JSDocNameReference,
JSDocNonNullableType,
JSDocNullableType,
Expand Down Expand Up @@ -2205,8 +2205,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
return emitJSDocTypedefTag(node as JSDocTypedefTag);
case SyntaxKind.JSDocSeeTag:
return emitJSDocSeeTag(node as JSDocSeeTag);
case SyntaxKind.JSDocImportTypeTag:
return emitJSDocImportTypeTag(node as JSDocImportTypeTag);
case SyntaxKind.JSDocImportTag:
return emitJSDocImportTag(node as JSDocImportTag);
// SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above)

// Transformation nodes
Expand Down Expand Up @@ -4455,7 +4455,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitJSDocComment(tag.comment);
}

function emitJSDocImportTypeTag(tag: JSDocImportTypeTag) {
function emitJSDocImportTag(tag: JSDocImportTag) {
emitJSDocTagName(tag.tagName);

writeSpace();
Expand Down
18 changes: 9 additions & 9 deletions src/compiler/factory/nodeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ import {
JSDocEnumTag,
JSDocFunctionType,
JSDocImplementsTag,
JSDocImportTypeTag,
JSDocImportTag,
JSDocLink,
JSDocLinkCode,
JSDocLinkPlain,
Expand Down Expand Up @@ -883,8 +883,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
updateJSDocImplementsTag,
createJSDocSeeTag,
updateJSDocSeeTag,
createJSDocImportTypeTag,
updateJSDocImportTypeTag,
createJSDocImportTag,
updateJSDocImportTag,
createJSDocNameReference,
updateJSDocNameReference,
createJSDocMemberName,
Expand Down Expand Up @@ -5558,20 +5558,20 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
}

// @api
function createJSDocImportTypeTag(tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment?: string | NodeArray<JSDocComment>): JSDocImportTypeTag {
const node = createBaseJSDocTag<JSDocImportTypeTag>(SyntaxKind.JSDocImportTypeTag, tagName ?? createIdentifier("importType"), comment);
function createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment?: string | NodeArray<JSDocComment>): JSDocImportTag {
const node = createBaseJSDocTag<JSDocImportTag>(SyntaxKind.JSDocImportTag, tagName ?? createIdentifier("import"), comment);
node.importClause = importClause;
node.moduleSpecifier = moduleSpecifier;
node.comment = comment;
return node;
}

function updateJSDocImportTypeTag(node: JSDocImportTypeTag, tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment: string | NodeArray<JSDocComment> | undefined): JSDocImportTypeTag {
function updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment: string | NodeArray<JSDocComment> | undefined): JSDocImportTag {
return node.tagName !== tagName
|| node.comment !== comment
|| node.importClause !== importClause
|| node.moduleSpecifier !== moduleSpecifier
? update(createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment), node)
? update(createJSDocImportTag(tagName, importClause, moduleSpecifier, comment), node)
: node;
}

Expand Down Expand Up @@ -7286,8 +7286,8 @@ function getDefaultTagNameForKind(kind: JSDocTag["kind"]): string {
return "augments";
case SyntaxKind.JSDocImplementsTag:
return "implements";
case SyntaxKind.JSDocImportTypeTag:
return "importType";
case SyntaxKind.JSDocImportTag:
return "import";
default:
return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`);
}
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/factory/nodeTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ import {
JSDocEnumTag,
JSDocFunctionType,
JSDocImplementsTag,
JSDocImportTypeTag,
JSDocImportTag,
JSDocLink,
JSDocLinkCode,
JSDocLinkPlain,
Expand Down Expand Up @@ -1203,8 +1203,8 @@ export function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag {
return node.kind === SyntaxKind.JSDocThrowsTag;
}

export function isJSDocImportTypeTag(node: Node): node is JSDocImportTypeTag {
return node.kind === SyntaxKind.JSDocImportTypeTag;
export function isJSDocImportTag(node: Node): node is JSDocImportTag {
return node.kind === SyntaxKind.JSDocImportTag;
}

// Synthesized list
Expand Down
20 changes: 10 additions & 10 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ import {
JSDocEnumTag,
JSDocFunctionType,
JSDocImplementsTag,
JSDocImportTypeTag,
JSDocImportTag,
JSDocLink,
JSDocLinkCode,
JSDocLinkPlain,
Expand Down Expand Up @@ -1126,7 +1126,7 @@ const forEachChildTable: ForEachChildTable = {
[SyntaxKind.JSDocReadonlyTag]: forEachChildInJSDocTag,
[SyntaxKind.JSDocDeprecatedTag]: forEachChildInJSDocTag,
[SyntaxKind.JSDocOverrideTag]: forEachChildInJSDocTag,
[SyntaxKind.JSDocImportTypeTag]: forEachChildInJSDocImportTypeTag,
[SyntaxKind.JSDocImportTag]: forEachChildInJSDocImportTag,
[SyntaxKind.PartiallyEmittedExpression]: forEachChildInPartiallyEmittedExpression,
};

Expand Down Expand Up @@ -1216,7 +1216,7 @@ function forEachChildInJSDocTag<T>(node: JSDocUnknownTag | JSDocClassTag | JSDoc
|| (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
}

function forEachChildInJSDocImportTypeTag<T>(node: JSDocImportTypeTag, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined {
function forEachChildInJSDocImportTag<T>(node: JSDocImportTag, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined {
return visitNode(cbNode, node.tagName)
|| visitNode(cbNode, node.importClause)
|| visitNode(cbNode, node.moduleSpecifier)
Expand Down Expand Up @@ -9082,8 +9082,8 @@ namespace Parser {
case "throws":
tag = parseThrowsTag(start, tagName, margin, indentText);
break;
case "importType":
tag = parseImportTypeTag(start, tagName, margin, indentText);
case "import":
tag = parseImportTag(start, tagName, margin, indentText);
break;
default:
tag = parseUnknownTag(start, tagName, margin, indentText);
Expand Down Expand Up @@ -9457,7 +9457,7 @@ namespace Parser {
return finishNode(factory.createJSDocSatisfiesTag(tagName, typeExpression, comments), start);
}

function parseImportTypeTag(start: number, tagName: Identifier, margin: number, indentText: string): JSDocImportTypeTag {
function parseImportTag(start: number, tagName: Identifier, margin: number, indentText: string): JSDocImportTag {
const afterImportTypeTagPos = scanner.getTokenFullStart();
sandersn marked this conversation as resolved.
Show resolved Hide resolved

let identifier: Identifier | undefined;
Expand All @@ -9467,9 +9467,9 @@ namespace Parser {

let importClause: ImportClause | undefined;
if (
identifier // @importType id
|| token() === SyntaxKind.AsteriskToken // @importType *
|| token() === SyntaxKind.OpenBraceToken // @importType {
identifier // @import id
|| token() === SyntaxKind.AsteriskToken // @import *
|| token() === SyntaxKind.OpenBraceToken // @import {
) {
importClause = parseImportClause(identifier, afterImportTypeTagPos, /*isTypeOnly*/ true);
a-tarasyuk marked this conversation as resolved.
Show resolved Hide resolved
parseExpected(SyntaxKind.FromKeyword);
a-tarasyuk marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -9479,7 +9479,7 @@ namespace Parser {

const moduleSpecifier = parseModuleSpecifier();
sandersn marked this conversation as resolved.
Show resolved Hide resolved
const comments = margin !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), margin, indentText) : undefined;
a-tarasyuk marked this conversation as resolved.
Show resolved Hide resolved
return finishNode(factory.createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comments), start);
return finishNode(factory.createJSDocImportTag(tagName, importClause, moduleSpecifier, comments), start);
}

function parseExpressionWithTypeArgumentsForAugments(): ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression; } {
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ import {
isImportTypeNode,
isIncrementalCompilation,
isInJSFile,
isJSDocImportTypeTag,
isJSDocImportTag,
isLiteralImportTypeNode,
isModifier,
isModuleDeclaration,
Expand Down Expand Up @@ -3450,10 +3450,10 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
}

function collectJsDocImportTypeReferences(file: SourceFile) {
sandersn marked this conversation as resolved.
Show resolved Hide resolved
const r = /@importType/g;
const r = /@import/g;
while (r.exec(file.text) !== null) { // eslint-disable-line no-null/no-null
const node = getNodeAtPosition(file, r.lastIndex);
if (isJSDocImportTypeTag(node)) {
if (isJSDocImportTag(node)) {
const moduleNameExpr = getExternalModuleName(node);
if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) {
setParentRecursive(node, /*incremental*/ false);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/transformers/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import {
isIndexSignatureDeclaration,
isInterfaceDeclaration,
isInternalDeclaration,
isJSDocImportTypeTag,
isJSDocImportTag,
isJsonSourceFile,
isLateVisibilityPaintedStatement,
isLiteralImportTypeNode,
Expand Down Expand Up @@ -1459,7 +1459,7 @@ export function transformDeclarations(context: TransformationContext) {
}
if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return;

if (isJSDocImportTypeTag(input)) return;
if (isJSDocImportTag(input)) return;

// Elide implementation signatures from overload sets
if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return;
Expand Down
24 changes: 12 additions & 12 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export const enum SyntaxKind {
JSDocPropertyTag,
JSDocThrowsTag,
JSDocSatisfiesTag,
JSDocImportTypeTag,
JSDocImportTag,

// Synthesized list
SyntaxList,
Expand Down Expand Up @@ -490,9 +490,9 @@ export const enum SyntaxKind {
LastStatement = DebuggerStatement,
FirstNode = QualifiedName,
FirstJSDocNode = JSDocTypeExpression,
LastJSDocNode = JSDocImportTypeTag,
LastJSDocNode = JSDocImportTag,
FirstJSDocTagNode = JSDocTag,
LastJSDocTagNode = JSDocImportTypeTag,
LastJSDocTagNode = JSDocImportTag,
/** @internal */ FirstContextualKeyword = AbstractKeyword,
/** @internal */ LastContextualKeyword = OfKeyword,
}
Expand Down Expand Up @@ -1046,7 +1046,7 @@ export type ForEachChildNodes =
| JSDocOverrideTag
| JSDocSatisfiesTag
| JSDocOverloadTag
| JSDocImportTypeTag;
| JSDocImportTag;

/** @internal */
export type HasChildren =
Expand Down Expand Up @@ -3656,7 +3656,7 @@ export type NamedExportBindings =
// import d, { a, b as x } from "mod" => name = d, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]}
export interface ImportClause extends NamedDeclaration {
readonly kind: SyntaxKind.ImportClause;
readonly parent: ImportDeclaration | JSDocImportTypeTag;
readonly parent: ImportDeclaration | JSDocImportTag;
readonly isTypeOnly: boolean;
readonly name?: Identifier; // Default binding
readonly namedBindings?: NamedImportBindings;
Expand Down Expand Up @@ -4067,8 +4067,8 @@ export interface JSDocSatisfiesExpression extends ParenthesizedExpression {
readonly _jsDocSatisfiesExpressionBrand: never;
}

export interface JSDocImportTypeTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocImportTypeTag;
export interface JSDocImportTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocImportTag;
readonly parent: JSDoc;
readonly importClause: ImportClause;
readonly moduleSpecifier: Expression;
Expand Down Expand Up @@ -5554,7 +5554,7 @@ export type AnyImportOrRequire = AnyImportSyntax | VariableDeclarationInitialize
export type AnyImportOrBareOrAccessedRequire = AnyImportSyntax | VariableDeclarationInitializedTo<RequireOrImportCall | AccessExpression>;

/** @internal */
export type AnyImportOrJsDocImportTypeImport = AnyImportSyntax | JSDocImportTypeTag;
export type AnyImportOrJsDocImport = AnyImportSyntax | JSDocImportTag;

/** @internal */
export type AliasDeclarationNode =
Expand Down Expand Up @@ -5586,7 +5586,7 @@ export interface ValidImportTypeNode extends ImportTypeNode {

/** @internal */
export type AnyValidImportOrReExport =
| (ImportDeclaration | ExportDeclaration | JSDocImportTypeTag) & { moduleSpecifier: StringLiteral; }
| (ImportDeclaration | ExportDeclaration | JSDocImportTag) & { moduleSpecifier: StringLiteral; }
| ImportEqualsDeclaration & { moduleReference: ExternalModuleReference & { expression: StringLiteral; }; }
| RequireOrImportCall
| ValidImportTypeNode;
Expand All @@ -5611,7 +5611,7 @@ export interface RequireVariableDeclarationList extends VariableDeclarationList

/** @internal */
export type LateVisibilityPaintedStatement =
| AnyImportOrJsDocImportTypeImport
| AnyImportOrJsDocImport
| VariableStatement
| ClassDeclaration
| FunctionDeclaration
Expand Down Expand Up @@ -8818,8 +8818,8 @@ export interface NodeFactory {
updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocSatisfiesTag;
updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocSatisfiesTag;
createJSDocImportTypeTag(tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment?: string | NodeArray<JSDocComment>): JSDocImportTypeTag;
updateJSDocImportTypeTag(node: JSDocImportTypeTag, tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment: string | NodeArray<JSDocComment> | undefined): JSDocImportTypeTag;
createJSDocImportTag(tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment?: string | NodeArray<JSDocComment>): JSDocImportTag;
updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier | undefined, importClause: ImportClause, moduleSpecifier: Expression, comment: string | NodeArray<JSDocComment> | undefined): JSDocImportTag;
createJSDocText(text: string): JSDocText;
updateJSDocText(node: JSDocText, text: string): JSDocText;
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
Expand Down
Loading
Loading