47 lines
2.2 KiB
Plaintext
47 lines
2.2 KiB
Plaintext
tests/cases/conformance/es6/modules/m1.ts(2,22): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
|
|
tests/cases/conformance/es6/modules/m1.ts(5,11): error TS2518: Only an ambient class can be merged with an interface.
|
|
tests/cases/conformance/es6/modules/m1.ts(5,11): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
|
|
tests/cases/conformance/es6/modules/m2.ts(3,1): error TS2348: Value of type 'typeof Decl' is not callable. Did you mean to include 'new'?
|
|
tests/cases/conformance/es6/modules/m2.ts(6,8): error TS2503: Cannot find namespace 'Entity'.
|
|
tests/cases/conformance/es6/modules/m2.ts(8,13): error TS2339: Property 'p1' does not exist on type 'Decl'.
|
|
tests/cases/conformance/es6/modules/m2.ts(8,20): error TS2339: Property 'p2' does not exist on type 'Decl'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/modules/m1.ts (3 errors) ====
|
|
|
|
export default class Decl {
|
|
~~~~
|
|
!!! error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
|
|
}
|
|
|
|
interface Decl {
|
|
~~~~
|
|
!!! error TS2518: Only an ambient class can be merged with an interface.
|
|
~~~~
|
|
!!! error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
|
|
p1: number;
|
|
p2: number;
|
|
}
|
|
|
|
namespace Decl {
|
|
interface I {
|
|
}
|
|
}
|
|
|
|
==== tests/cases/conformance/es6/modules/m2.ts (4 errors) ====
|
|
import Entity from "m1"
|
|
|
|
Entity();
|
|
~~~~~~~~
|
|
!!! error TS2348: Value of type 'typeof Decl' is not callable. Did you mean to include 'new'?
|
|
|
|
var x: Entity;
|
|
var y: Entity.I;
|
|
~~~~~~
|
|
!!! error TS2503: Cannot find namespace 'Entity'.
|
|
var z = new Entity();
|
|
var sum = z.p1 + z.p2
|
|
~~
|
|
!!! error TS2339: Property 'p1' does not exist on type 'Decl'.
|
|
~~
|
|
!!! error TS2339: Property 'p2' does not exist on type 'Decl'. |