๐ 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.
๐ Search Terms
โimportโ
๐ Version & Regression Information
โฏ Playground Link
https://github.com/remcohaszing/typescript-jsdoc-import-bug
๐ป Code
๐ Actual behavior
TypeScript emits the following type invalid definition:
๐ Expected behavior
TypeScript emits the following valid type definition:
Additional information about the issue
This bug does not appear in the playground, only when running
tsclocally.