mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
42 lines
2.4 KiB
Plaintext
42 lines
2.4 KiB
Plaintext
arbitraryModuleNamespaceIdentifiers_module.ts(20,7): error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
|
|
arbitraryModuleNamespaceIdentifiers_module.ts(24,7): error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
|
|
arbitraryModuleNamespaceIdentifiers_module.ts(29,7): error TS2322: Type '"expect error about otherType"' is not assignable to type '"otherType"'.
|
|
|
|
|
|
==== arbitraryModuleNamespaceIdentifiers_module.ts (3 errors) ====
|
|
const someValue = "someValue";
|
|
type someType = "someType";
|
|
|
|
export { someValue as "<X>" };
|
|
import { "<X>" as valueX } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
if (valueX !== "someValue") throw "should be someValue";
|
|
|
|
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
import { "<Y>" as valueY } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
if (valueY !== "someValue") throw "should be someValue";
|
|
|
|
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
import { "<Z>" as valueZ } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
if (valueZ["<X>"] !== "someValue") throw "should be someValue";
|
|
if (valueZ["<Y>"] !== "someValue") throw "should be someValue";
|
|
if (valueZ["<Z>"] !== valueZ) throw "should be export namespace";
|
|
|
|
export { type someType as "<A>" };
|
|
import { type "<A>" as typeA } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
const importTest: typeA = "expect error about someType";
|
|
~~~~~~~~~~
|
|
!!! error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
|
|
|
|
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
import { type "<B>" as typeB } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
const reimportTest: typeB = "expect error about someType";
|
|
~~~~~~~~~~~~
|
|
!!! error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
|
|
|
|
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
import { type "<C>" as typeC } from "./arbitraryModuleNamespaceIdentifiers_module";
|
|
export type otherType = "otherType";
|
|
const importStarTestA: typeC.otherType = "expect error about otherType";
|
|
~~~~~~~~~~~~~~~
|
|
!!! error TS2322: Type '"expect error about otherType"' is not assignable to type '"otherType"'.
|
|
|