Closed
Description
Bug Report
π Search Terms
Export default type
Export default type reference error
π Version & Regression Information
This has always been the behavior
β― Playground Link
π» Code
import type {SyntaxKind} from "typescript"
export default SyntaxKind
Emits ESM
export default SyntaxKind
Emits CommonJs
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = SyntaxKind;
which causes a reference error.
π Actual behavior
Emitted code errors at runtime with reference error
π Expected behavior
If I am default exporting a type I'd like that to be dropped from the emitted code as to not error.
Since this is old behavior I'm guessing this might have something to do with globals that I do not understand? Any clarification on the issue is also super appreciated.