mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
be5de2a808
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
24 lines
991 B
TypeScript
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 "" };
|