-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
π Search Terms
@type {const}
const
definition types
π Version & Regression Information
- This is a crash in all versions
β― Playground Link
π» Code
// Typescript file
export const myConst = /** @type {const} */ {
foo: 'bar',
fuu: {
foo: 'bar'
}
};
// Javascript file
export const myConst = /** @type {const} */ {
foo: 'bar',
fuu: {
foo: 'bar'
}
};
π Actual behavior
// .D.TS from Typescript file
export declare const myConst: {
foo: string;
fuu: {
foo: string;
};
};
// .D.TS from Javascript file
export namespace myConst {
let foo: string;
namespace fuu {
let foo_1: string;
export { foo_1 as foo };
}
}
π Expected behavior
Same output in both cases. Typescript file output is the correct one.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone