mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
715 B
Plaintext
23 lines
715 B
Plaintext
a.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
|
|
|
|
|
==== b.ts (0 errors) ====
|
|
import a = require("./a");
|
|
const c1 = a.a;
|
|
const c2 = a.b;
|
|
let v1: a.Foo = { x: "test" };
|
|
let v2: a.Bar.Baz = { y: 42 };
|
|
|
|
==== a.ts (1 errors) ====
|
|
export type Foo = { x: string };
|
|
export namespace Bar {
|
|
export interface Baz { y: number }
|
|
}
|
|
namespace mod {
|
|
export type Foo = { s: string }; // Causes error
|
|
export const a = 1;
|
|
export const b = "hello";
|
|
}
|
|
export = mod;
|
|
~~~~~~~~~~~~~
|
|
!!! error TS2309: An export assignment cannot be used in a module with other exported elements. |