304 lines
No EOL
12 KiB
Text
304 lines
No EOL
12 KiB
Text
tests/cases/compiler/main.ts(15,1): error TS2304: Cannot find name 'z1'.
|
|
tests/cases/compiler/main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'.
|
|
tests/cases/compiler/main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'.
|
|
tests/cases/compiler/main.ts(27,8): error TS1192: Module '"interface"' has no default export.
|
|
tests/cases/compiler/main.ts(28,8): error TS1192: Module '"variable"' has no default export.
|
|
tests/cases/compiler/main.ts(29,8): error TS1192: Module '"interface-variable"' has no default export.
|
|
tests/cases/compiler/main.ts(30,8): error TS1192: Module '"module"' has no default export.
|
|
tests/cases/compiler/main.ts(31,8): error TS1192: Module '"interface-module"' has no default export.
|
|
tests/cases/compiler/main.ts(32,8): error TS1192: Module '"variable-module"' has no default export.
|
|
tests/cases/compiler/main.ts(33,8): error TS1192: Module '"function"' has no default export.
|
|
tests/cases/compiler/main.ts(34,8): error TS1192: Module '"function-module"' has no default export.
|
|
tests/cases/compiler/main.ts(35,8): error TS1192: Module '"class"' has no default export.
|
|
tests/cases/compiler/main.ts(36,8): error TS1192: Module '"class-module"' has no default export.
|
|
tests/cases/compiler/main.ts(39,21): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(45,21): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(47,21): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(62,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(68,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(70,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(85,25): error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(91,25): error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(93,25): error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
tests/cases/compiler/main.ts(97,15): error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(98,15): error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(99,15): error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(100,15): error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(101,15): error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(102,15): error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(103,15): error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(104,15): error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(105,15): error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'.
|
|
tests/cases/compiler/main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
|
|
|
|
|
==== tests/cases/compiler/main.ts (32 errors) ====
|
|
/// <reference path="modules.d.ts"/>
|
|
|
|
// import-equals
|
|
import z1 = require("interface");
|
|
import z2 = require("variable");
|
|
import z3 = require("interface-variable");
|
|
import z4 = require("module");
|
|
import z5 = require("interface-module");
|
|
import z6 = require("variable-module");
|
|
import z7 = require("function");
|
|
import z8 = require("function-module");
|
|
import z9 = require("class");
|
|
import z0 = require("class-module");
|
|
|
|
z1.a;
|
|
~~
|
|
!!! error TS2304: Cannot find name 'z1'.
|
|
z2.a;
|
|
z3.a;
|
|
z4.a;
|
|
z5.a;
|
|
z6.a;
|
|
z7.a;
|
|
~
|
|
!!! error TS2339: Property 'a' does not exist on type '() => any'.
|
|
z8.a;
|
|
z9.a;
|
|
~
|
|
!!! error TS2339: Property 'a' does not exist on type 'typeof Foo'.
|
|
z0.a;
|
|
|
|
// default import
|
|
import x1 from "interface";
|
|
~~
|
|
!!! error TS1192: Module '"interface"' has no default export.
|
|
import x2 from "variable";
|
|
~~
|
|
!!! error TS1192: Module '"variable"' has no default export.
|
|
import x3 from "interface-variable";
|
|
~~
|
|
!!! error TS1192: Module '"interface-variable"' has no default export.
|
|
import x4 from "module";
|
|
~~
|
|
!!! error TS1192: Module '"module"' has no default export.
|
|
import x5 from "interface-module";
|
|
~~
|
|
!!! error TS1192: Module '"interface-module"' has no default export.
|
|
import x6 from "variable-module";
|
|
~~
|
|
!!! error TS1192: Module '"variable-module"' has no default export.
|
|
import x7 from "function";
|
|
~~
|
|
!!! error TS1192: Module '"function"' has no default export.
|
|
import x8 from "function-module";
|
|
~~
|
|
!!! error TS1192: Module '"function-module"' has no default export.
|
|
import x9 from "class";
|
|
~~
|
|
!!! error TS1192: Module '"class"' has no default export.
|
|
import x0 from "class-module";
|
|
~~
|
|
!!! error TS1192: Module '"class-module"' has no default export.
|
|
|
|
// namespace import
|
|
import * as y1 from "interface";
|
|
~~~~~~~~~~~
|
|
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import * as y2 from "variable";
|
|
import * as y3 from "interface-variable";
|
|
import * as y4 from "module";
|
|
import * as y5 from "interface-module";
|
|
import * as y6 from "variable-module";
|
|
import * as y7 from "function";
|
|
~~~~~~~~~~
|
|
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import * as y8 from "function-module";
|
|
import * as y9 from "class";
|
|
~~~~~~~
|
|
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import * as y0 from "class-module";
|
|
|
|
y1.a;
|
|
y2.a;
|
|
y3.a;
|
|
y4.a;
|
|
y5.a;
|
|
y6.a;
|
|
y7.a;
|
|
y8.a;
|
|
y9.a;
|
|
y0.a;
|
|
|
|
// named import
|
|
import { a as a1 } from "interface";
|
|
~~~~~~~~~~~
|
|
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import { a as a2 } from "variable";
|
|
import { a as a3 } from "interface-variable";
|
|
import { a as a4 } from "module";
|
|
import { a as a5 } from "interface-module";
|
|
import { a as a6 } from "variable-module";
|
|
import { a as a7 } from "function";
|
|
~~~~~~~~~~
|
|
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import { a as a8 } from "function-module";
|
|
import { a as a9 } from "class";
|
|
~~~~~~~
|
|
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
import { a as a0 } from "class-module";
|
|
|
|
a1;
|
|
a2;
|
|
a3;
|
|
a4;
|
|
a5;
|
|
a6;
|
|
a7;
|
|
a8;
|
|
a9;
|
|
a0;
|
|
|
|
// named export
|
|
export { a as a1 } from "interface";
|
|
~~~~~~~~~~~
|
|
!!! error TS2497: Module '"interface"' resolves to a non-module entity and cannot be imported using this construct.
|
|
export { a as a2 } from "variable";
|
|
export { a as a3 } from "interface-variable";
|
|
export { a as a4 } from "module";
|
|
export { a as a5 } from "interface-module";
|
|
export { a as a6 } from "variable-module";
|
|
export { a as a7 } from "function";
|
|
~~~~~~~~~~
|
|
!!! error TS2497: Module '"function"' resolves to a non-module entity and cannot be imported using this construct.
|
|
export { a as a8 } from "function-module";
|
|
export { a as a9 } from "class";
|
|
~~~~~~~
|
|
!!! error TS2497: Module '"class"' resolves to a non-module entity and cannot be imported using this construct.
|
|
export { a as a0 } from "class-module";
|
|
|
|
// export-star
|
|
export * from "interface";
|
|
~~~~~~~~~~~
|
|
!!! error TS2498: Module '"interface"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "variable";
|
|
~~~~~~~~~~
|
|
!!! error TS2498: Module '"variable"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "interface-variable";
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2498: Module '"interface-variable"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "module";
|
|
~~~~~~~~
|
|
!!! error TS2498: Module '"module"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "interface-module";
|
|
~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2498: Module '"interface-module"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "variable-module";
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2498: Module '"variable-module"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "function";
|
|
~~~~~~~~~~
|
|
!!! error TS2498: Module '"function"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "function-module";
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2498: Module '"function-module"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "class";
|
|
~~~~~~~
|
|
!!! error TS2498: Module '"class"' uses 'export =' and cannot be used with 'export *'.
|
|
export * from "class-module";
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'.
|
|
|
|
==== tests/cases/compiler/modules.d.ts (0 errors) ====
|
|
|
|
declare module "interface" {
|
|
interface Foo {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "variable" {
|
|
var Foo: {
|
|
a: number;
|
|
b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "interface-variable" {
|
|
interface Foo {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
var Foo: {
|
|
a: number;
|
|
b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "module" {
|
|
module Foo {
|
|
export var a: number;
|
|
export var b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "interface-module" {
|
|
interface Foo {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
module Foo {
|
|
export var a: number;
|
|
export var b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "variable-module" {
|
|
module Foo {
|
|
interface Bar {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
}
|
|
var Foo: {
|
|
a: number;
|
|
b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "function" {
|
|
function foo();
|
|
export = foo;
|
|
}
|
|
|
|
declare module "function-module" {
|
|
function foo();
|
|
module foo {
|
|
export var a: number;
|
|
export var b: number;
|
|
}
|
|
export = foo;
|
|
}
|
|
|
|
declare module "class" {
|
|
class Foo {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|
|
declare module "class-module" {
|
|
class Foo {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
module Foo {
|
|
export var a: number;
|
|
export var b: number;
|
|
}
|
|
export = Foo;
|
|
}
|
|
|