Files
tsgo/testdata/baselines/reference/submodule/conformance/arbitraryModuleNamespaceIdentifiers_exportEmpty.js
be5de2a808 Fix declaration emit to remove non-JSDoc comments while preserving JSDoc (#1752)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jakebailey <[email protected]>
2025-09-26 02:23:32 +00:00

24 lines
991 B
TypeScript

//// [tests/cases/conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_exportEmpty.ts] ////
//// [arbitraryModuleNamespaceIdentifiers_exportEmpty.ts]
// This should result in a type error. In particular, the empty string is a now
// a valid module export name, and should be treated as such here.
const empty = "empty";
export { empty as "" };
import { "" as foo } from "./arbitraryModuleNamespaceIdentifiers_exportEmpty";
const bar: "type error expected here" = foo;
//// [arbitraryModuleNamespaceIdentifiers_exportEmpty.js]
// This should result in a type error. In particular, the empty string is a now
// a valid module export name, and should be treated as such here.
const empty = "empty";
export { empty as "" };
import { "" as foo } from "./arbitraryModuleNamespaceIdentifiers_exportEmpty";
const bar = foo;
//// [arbitraryModuleNamespaceIdentifiers_exportEmpty.d.ts]
declare const empty = "empty";
export { empty as "" };