Skip to content

@link comments don't work above switch casesΒ #47713

@pushkine

Description

@pushkine

Bug Report

πŸ•— Version & Regression Information

ts stable & nightly

⏯ Playground Link

Playground Link

πŸ’» Code

type A = 1 | 2;

/** {@link A} */
//         ^? type A = 1 | 2;
switch (0 as A) {
	/** {@link A} */
	//         ^? No definition found for 'A'
	case 1:
	case 2:
}

πŸ™ Actual behavior

/** {@link A} */ to find the type of A in both cases

πŸ™‚ Expected behavior

/** {@link A} */ cannot find type A when placed above a switch case

--

Code_2022-02-03_07-50-09

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions