Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions tests/baselines/reference/jsdocLinkTag9.symbols
Original file line number Diff line number Diff line change
@@ -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))
}

23 changes: 23 additions & 0 deletions tests/baselines/reference/jsdocLinkTag9.types
Original file line number Diff line number Diff line change
@@ -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
> : ^^^^^^^^^^^^^^
}

16 changes: 16 additions & 0 deletions tests/cases/conformance/jsdoc/jsdocLinkTag9.ts
Original file line number Diff line number Diff line change
@@ -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,
}