-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
๐ Search Terms
โimportโ
๐ Version & Regression Information
- This changed between versions 5.4 and 5.5
- I was unable to test this on prior versions because this feature was introduced in TypeScript 5.5
โฏ Playground Link
https://github.com/remcohaszing/typescript-jsdoc-import-bug
๐ป Code
/**
* @import {
* Program
* } from 'estree'
*/
/**
* @param {Program} program
*/
export function compile(program) {}๐ Actual behavior
TypeScript emits the following type invalid definition:
/**
* @import {
* Program
* } from 'estree'
*/
/**
* @param {Program} program
*/
export function compile(program: * Program): void;
import type { Program } from 'estree';๐ Expected behavior
TypeScript emits the following valid type definition:
/**
* @import {
* Program
* } from 'estree'
*/
/**
* @param {Program} program
*/
export function compile(program: Program): void;
import type { Program } from 'estree';Additional information about the issue
This bug does not appear in the playground, only when running tsc locally.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyFix AvailableA PR has been opened for this issueA PR has been opened for this issue