mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
importStatementsInterfaces.ts(23,19): error TS2708: Cannot use namespace 'a' as a value.
|
|
|
|
|
|
==== importStatementsInterfaces.ts (1 errors) ====
|
|
namespace A {
|
|
export interface Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
export namespace inA {
|
|
export interface Point3D extends Point {
|
|
z: number;
|
|
}
|
|
}
|
|
}
|
|
|
|
// no code gen expected
|
|
namespace B {
|
|
import a = A;
|
|
}
|
|
|
|
// no code gen expected
|
|
namespace C {
|
|
import a = A;
|
|
import b = a.inA;
|
|
var m: typeof a;
|
|
~
|
|
!!! error TS2708: Cannot use namespace 'a' as a value.
|
|
var p: b.Point3D;
|
|
var p = {x:0, y:0, z: 0 };
|
|
}
|
|
|
|
// no code gen expected
|
|
namespace D {
|
|
import a = A;
|
|
|
|
var p : a.Point;
|
|
}
|
|
|
|
// no code gen expected
|
|
namespace E {
|
|
import a = A.inA;
|
|
export function xDist(x: a.Point3D) {
|
|
return 0 - x.x;
|
|
}
|
|
} |