diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index abd6fd4bf2e8d..9b0adae70bbd4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -47165,7 +47165,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkCollisionsForDeclarationName(node, node.name); checkExportsOnMergedDeclarations(node); - node.members.forEach(checkEnumMember); + node.members.forEach(checkSourceElement); if (compilerOptions.erasableSyntaxOnly && !(node.flags & NodeFlags.Ambient)) { error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); @@ -48366,6 +48366,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return checkTypeAliasDeclaration(node as TypeAliasDeclaration); case SyntaxKind.EnumDeclaration: return checkEnumDeclaration(node as EnumDeclaration); + case SyntaxKind.EnumMember: + return checkEnumMember(node as EnumMember); case SyntaxKind.ModuleDeclaration: return checkModuleDeclaration(node as ModuleDeclaration); case SyntaxKind.ImportDeclaration: diff --git a/tests/baselines/reference/jsdocLinkTag9.symbols b/tests/baselines/reference/jsdocLinkTag9.symbols new file mode 100644 index 0000000000000..cefcebbbe11f7 --- /dev/null +++ b/tests/baselines/reference/jsdocLinkTag9.symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/jsdoc/jsdocLinkTag9.ts] //// + +=== /a.ts === +export interface A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== /b.ts === +import type { A } from "./a"; +>A : Symbol(A, Decl(b.ts, 0, 13)) + +export enum Enum { +>Enum : Symbol(Enum, Decl(b.ts, 0, 29)) + + /** + * {@link A} + */ + EnumValue, +>EnumValue : Symbol(Enum.EnumValue, Decl(b.ts, 2, 18)) +} + diff --git a/tests/baselines/reference/jsdocLinkTag9.types b/tests/baselines/reference/jsdocLinkTag9.types new file mode 100644 index 0000000000000..0671a3ee934db --- /dev/null +++ b/tests/baselines/reference/jsdocLinkTag9.types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/jsdoc/jsdocLinkTag9.ts] //// + +=== /a.ts === + +export interface A {} + +=== /b.ts === +import type { A } from "./a"; +>A : A +> : ^ + +export enum Enum { +>Enum : Enum +> : ^^^^ + + /** + * {@link A} + */ + EnumValue, +>EnumValue : Enum.EnumValue +> : ^^^^^^^^^^^^^^ +} + diff --git a/tests/cases/conformance/jsdoc/jsdocLinkTag9.ts b/tests/cases/conformance/jsdoc/jsdocLinkTag9.ts new file mode 100644 index 0000000000000..1cc1783245421 --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocLinkTag9.ts @@ -0,0 +1,16 @@ +// @strict: true +// @noUnusedLocals: true +// @noEmit: true + +// @filename: /a.ts +export interface A {} + +// @filename: /b.ts +import type { A } from "./a"; + +export enum Enum { + /** + * {@link A} + */ + EnumValue, +}