mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Update test files to use namespace instead of module keyword
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
// test
|
||||
var f = ''
|
||||
// test #2
|
||||
module foo {
|
||||
namespace foo {
|
||||
function bar() { }
|
||||
}
|
||||
// test #3
|
||||
module empty {
|
||||
namespace empty {
|
||||
}
|
||||
// test #4
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ var f = ''
|
||||
>f : Symbol(f, Decl(commentEmitAtEndOfFile1.ts, 1, 3))
|
||||
|
||||
// test #2
|
||||
module foo {
|
||||
namespace foo {
|
||||
>foo : Symbol(foo, Decl(commentEmitAtEndOfFile1.ts, 1, 10))
|
||||
|
||||
function bar() { }
|
||||
>bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 12))
|
||||
>bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 15))
|
||||
}
|
||||
// test #3
|
||||
module empty {
|
||||
namespace empty {
|
||||
>empty : Symbol(empty, Decl(commentEmitAtEndOfFile1.ts, 5, 1))
|
||||
}
|
||||
// test #4
|
||||
|
||||
@@ -9,7 +9,7 @@ var f = ''
|
||||
> : ^^
|
||||
|
||||
// test #2
|
||||
module foo {
|
||||
namespace foo {
|
||||
>foo : typeof foo
|
||||
> : ^^^^^^^^^^
|
||||
|
||||
@@ -18,6 +18,6 @@ module foo {
|
||||
> : ^^^^^^^^^^
|
||||
}
|
||||
// test #3
|
||||
module empty {
|
||||
namespace empty {
|
||||
}
|
||||
// test #4
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module M {
|
||||
namespace M {
|
||||
function foo();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export module N {
|
||||
}
|
||||
export import X = N;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @module: commonjs
|
||||
|
||||
module foo {
|
||||
namespace foo {
|
||||
export class Provide {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module foo {
|
||||
namespace foo {
|
||||
export class Provide {
|
||||
}
|
||||
export module bar { export module baz {export class boo {}}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @declaration: true
|
||||
module M {
|
||||
module N {
|
||||
namespace M {
|
||||
namespace N {
|
||||
}
|
||||
export import X = N;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// @declaration: true
|
||||
module M {
|
||||
module N {
|
||||
namespace M {
|
||||
namespace N {
|
||||
class C {
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ let x = new alias.Class();
|
||||
let y = new cls();
|
||||
let z = new cls2();
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
export import cls = alias.Class;
|
||||
let x = new alias.Class();
|
||||
let y = new cls();
|
||||
|
||||
@@ -9,7 +9,7 @@ let x = new alias.Class();
|
||||
let y = new cls();
|
||||
let z = new cls2();
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
export import cls = alias.Class;
|
||||
let x = new alias.Class();
|
||||
let y = new cls();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @module: commonjs
|
||||
// @alwaysStrict: true
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// @outFile: out.js
|
||||
|
||||
// @fileName: a.ts
|
||||
module M {
|
||||
namespace M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
}
|
||||
|
||||
// @fileName: b.ts
|
||||
module M {
|
||||
namespace M {
|
||||
export function f2() {
|
||||
var arguments = [];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// @alwaysStrict: true
|
||||
// @noImplicitUseStrict: true
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//@module: amd
|
||||
// @Filename: ambientExternalModuleWithInternalImportDeclaration_0.ts
|
||||
declare module 'M' {
|
||||
module C {
|
||||
namespace C {
|
||||
export var f: number;
|
||||
}
|
||||
class C {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//@module: amd
|
||||
// @Filename: ambientExternalModuleWithoutInternalImportDeclaration_0.ts
|
||||
declare module 'M' {
|
||||
module C {
|
||||
namespace C {
|
||||
export var f: number;
|
||||
}
|
||||
class C {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export class C {
|
||||
m(fn:{ (n:number):string; },n2:number):string {
|
||||
return fn(n2);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
declare var x: any;
|
||||
module myMod {
|
||||
namespace myMod {
|
||||
var myFn;
|
||||
function myFn() { }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Test {
|
||||
namespace Test {
|
||||
interface IState {
|
||||
}
|
||||
interface IToken {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Test {
|
||||
namespace Test {
|
||||
interface IState {
|
||||
}
|
||||
interface IToken {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module EmptyTypes {
|
||||
namespace EmptyTypes {
|
||||
interface iface { }
|
||||
class base implements iface { }
|
||||
class base2 implements iface { }
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
module NonEmptyTypes {
|
||||
namespace NonEmptyTypes {
|
||||
interface iface { x: string; }
|
||||
class base implements iface { x: string; y: string; }
|
||||
class base2 implements iface { x: string; z: string; }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module M {
|
||||
namespace M {
|
||||
() => 0;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
module missingArrowsWithCurly {
|
||||
namespace missingArrowsWithCurly {
|
||||
var a = () { };
|
||||
|
||||
var b = (): void { }
|
||||
@@ -11,8 +11,8 @@ module missingArrowsWithCurly {
|
||||
var e = (x: number, y: string): void { };
|
||||
}
|
||||
|
||||
module missingCurliesWithArrow {
|
||||
module withStatement {
|
||||
namespace missingCurliesWithArrow {
|
||||
namespace withStatement {
|
||||
var a = () => var k = 10;};
|
||||
|
||||
var b = (): void => var k = 10;}
|
||||
@@ -26,7 +26,7 @@ module missingCurliesWithArrow {
|
||||
var f = () => var k = 10;}
|
||||
}
|
||||
|
||||
module withoutStatement {
|
||||
namespace withoutStatement {
|
||||
var a = () => };
|
||||
|
||||
var b = (): void => }
|
||||
@@ -41,7 +41,7 @@ module missingCurliesWithArrow {
|
||||
}
|
||||
}
|
||||
|
||||
module ce_nEst_pas_une_arrow_function {
|
||||
namespace ce_nEst_pas_une_arrow_function {
|
||||
var a = ();
|
||||
|
||||
var b = (): void;
|
||||
@@ -53,7 +53,7 @@ module ce_nEst_pas_une_arrow_function {
|
||||
var e = (x: number, y: string): void;
|
||||
}
|
||||
|
||||
module okay {
|
||||
namespace okay {
|
||||
var a = () => { };
|
||||
|
||||
var b = (): void => { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
interface I {
|
||||
salt:number;
|
||||
pepper:number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Test {
|
||||
namespace Test {
|
||||
class Mocked {
|
||||
myProp: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
interface I {
|
||||
f(n:number):boolean;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
module A {}
|
||||
namespace A {}
|
||||
A = undefined; // invalid LHS
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa = {};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithPublicAndOptional<T,U> { constructor(public one: T, public two?: U) {} } var x4 = new classWithPublicAndOptional<number, string>(1);;
|
||||
export var __val__x4 = x4;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: 1};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: "1"};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: "1"};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: true};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: true};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: <any[]>[1]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: <any[]>[1]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: [1]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: [1]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: ["1"]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: ["1"]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: [true]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {two: [true]};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = function f<Tstring>(a: Tstring) { return a; };;
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{two:number;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:string;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{two:string;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:boolean;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:any[];};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj = {one: 1};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:number[];};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:string[];};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:boolean[];};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj: { <Tstring>(a: Tstring): Tstring; };
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var obj: { <Tnumber>(a:Tnumber):Tnumber;};
|
||||
export var __val__obj = obj;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{[index:number]:number;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{[index:string]:any;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{ new <Tnumber>(param: Tnumber); };;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{ new <Tstring>(param: Tstring); };;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithTwoPublic<T,U> { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");;
|
||||
export var __val__x2 = x2;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export var aa:{one:number;};;
|
||||
export var __val__aa = aa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithPrivate<T> { constructor(private one: T) {} } var x5 = new classWithPrivate(1);;
|
||||
export var __val__x5 = x5;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithTwoPrivate<T,U> { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");;
|
||||
export var __val__x6 = x6;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithPublicPrivate<T,U> { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");;
|
||||
export var __val__x7 = x7;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export interface interfaceTwo<T,U> { one: T; two: U; }; var obj2: interfaceTwo<number,string> = { one: 1, two: "a" };;
|
||||
export var __val__obj2 = obj2;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export interface interfaceOne<T> { one: T; }; var obj1: interfaceOne<number> = { one: 1 };;
|
||||
export var __val__obj1 = obj1;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export interface interfaceWithOptional<T> { one?: T; }; var obj3: interfaceWithOptional<number> = { };;
|
||||
export var __val__obj3 = obj3;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithPublic<T> { constructor(public one: T) {} } var x1 = new classWithPublic(1);;
|
||||
export var __val__x1 = x1;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module __test1__ {
|
||||
namespace __test1__ {
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
export var __val__obj4 = obj4;
|
||||
}
|
||||
module __test2__ {
|
||||
namespace __test2__ {
|
||||
export class classWithOptional<T> { constructor(public one?: T) {} } var x3 = new classWithOptional<number>();;
|
||||
export var __val__x3 = x3;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function fn() { }
|
||||
fn = () => 3;
|
||||
|
||||
module foo {
|
||||
namespace foo {
|
||||
function xyz() {
|
||||
function bar() {
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ var goodObj: Object = {
|
||||
var errFun: Function = {}; // Error for no call signature
|
||||
|
||||
function foo() { }
|
||||
module foo {
|
||||
namespace foo {
|
||||
export var boom = 0;
|
||||
}
|
||||
|
||||
var goodFundule: Function = foo; // ok
|
||||
|
||||
function bar() { }
|
||||
module bar {
|
||||
namespace bar {
|
||||
export function apply(thisArg: string, argArray?: string) { }
|
||||
}
|
||||
|
||||
var goodFundule2: Function = bar; // ok
|
||||
|
||||
function bad() { }
|
||||
module bad {
|
||||
namespace bad {
|
||||
export var apply = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Should all be allowed
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
}
|
||||
M = null;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// class then module
|
||||
class c5 { public foo() { } }
|
||||
module c5 { } // should be ok
|
||||
namespace c5 { } // should be ok
|
||||
|
||||
class c5a { public foo() { } }
|
||||
module c5a { var y = 2; } // should be ok
|
||||
namespace c5a { var y = 2; } // should be ok
|
||||
|
||||
class c5b { public foo() { } }
|
||||
module c5b { export var y = 2; } // should be ok
|
||||
namespace c5b { export var y = 2; } // should be ok
|
||||
|
||||
//// class then import
|
||||
class c5c { public foo() { } }
|
||||
|
||||
@@ -22,13 +22,13 @@ enum e5a { One } // error
|
||||
|
||||
// enum then internal module
|
||||
enum e6 { One }
|
||||
module e6 { } // ok
|
||||
namespace e6 { } // ok
|
||||
|
||||
enum e6a { One }
|
||||
module e6a { var y = 2; } // should be error
|
||||
namespace e6a { var y = 2; } // should be error
|
||||
|
||||
enum e6b { One }
|
||||
module e6b { export var y = 2; } // should be error
|
||||
namespace e6b { export var y = 2; } // should be error
|
||||
|
||||
// enum then import, messes with error reporting
|
||||
//enum e7 { One }
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
module E {
|
||||
namespace E {
|
||||
var t;
|
||||
}
|
||||
enum E { }
|
||||
|
||||
enum F { }
|
||||
module F { var t; }
|
||||
namespace F { var t; }
|
||||
|
||||
module A {
|
||||
namespace A {
|
||||
var o;
|
||||
}
|
||||
enum A {
|
||||
@@ -15,6 +15,6 @@ enum A {
|
||||
enum A {
|
||||
c
|
||||
}
|
||||
module A {
|
||||
namespace A {
|
||||
var p;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
//@module: amd
|
||||
export var a = 1;
|
||||
class c5 { public foo() { } }
|
||||
module c5 { } // should be ok everywhere
|
||||
namespace c5 { } // should be ok everywhere
|
||||
@@ -22,16 +22,16 @@ enum y4 { One } // error
|
||||
|
||||
// function then internal module
|
||||
function y5() { }
|
||||
module y5 { } // ok since module is not instantiated
|
||||
namespace y5 { } // ok since module is not instantiated
|
||||
|
||||
function y5a() { }
|
||||
module y5a { var y = 2; } // should be an error
|
||||
namespace y5a { var y = 2; } // should be an error
|
||||
|
||||
function y5b() { }
|
||||
module y5b { export var y = 3; } // should be an error
|
||||
namespace y5b { export var y = 3; } // should be an error
|
||||
|
||||
function y5c() { }
|
||||
module y5c { export interface I { foo(): void } } // should be an error
|
||||
namespace y5c { export interface I { foo(): void } } // should be an error
|
||||
|
||||
// function then import, messes with other errors
|
||||
//function y6() { }
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
// module then var
|
||||
module m1 { }
|
||||
namespace m1 { }
|
||||
var m1 = 1; // Should be allowed
|
||||
|
||||
module m1a { var y = 2; } // error
|
||||
namespace m1a { var y = 2; } // error
|
||||
var m1a = 1; // error
|
||||
|
||||
module m1b { export var y = 2; } // error
|
||||
namespace m1b { export var y = 2; } // error
|
||||
var m1b = 1; // error
|
||||
|
||||
module m1c {
|
||||
namespace m1c {
|
||||
export interface I { foo(): void; }
|
||||
}
|
||||
var m1c = 1; // Should be allowed
|
||||
|
||||
module m1d { // error
|
||||
namespace m1d { // error
|
||||
export class I { foo() { } }
|
||||
}
|
||||
var m1d = 1; // error
|
||||
|
||||
// module then function
|
||||
module m2 { }
|
||||
namespace m2 { }
|
||||
function m2() { }; // ok since the module is not instantiated
|
||||
|
||||
module m2a { var y = 2; }
|
||||
namespace m2a { var y = 2; }
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
namespace m2b { export var y = 2; }
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
// should be errors to have function first
|
||||
function m2c() { };
|
||||
module m2c { export var y = 2; }
|
||||
namespace m2c { export var y = 2; }
|
||||
|
||||
module m2d { }
|
||||
namespace m2d { }
|
||||
declare function m2d(): void;
|
||||
|
||||
declare function m2e(): void;
|
||||
module m2e { }
|
||||
namespace m2e { }
|
||||
|
||||
function m2f() { };
|
||||
module m2f { export interface I { foo(): void } }
|
||||
namespace m2f { export interface I { foo(): void } }
|
||||
|
||||
function m2g() { };
|
||||
module m2g { export class C { foo() { } } }
|
||||
namespace m2g { export class C { foo() { } } }
|
||||
|
||||
// module then class
|
||||
module m3 { }
|
||||
namespace m3 { }
|
||||
class m3 { } // ok since the module is not instantiated
|
||||
|
||||
module m3a { var y = 2; }
|
||||
namespace m3a { var y = 2; }
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
|
||||
class m3b { foo() { } }
|
||||
module m3b { var y = 2; }
|
||||
namespace m3b { var y = 2; }
|
||||
|
||||
class m3c { foo() { } }
|
||||
module m3c { export var y = 2; }
|
||||
namespace m3c { export var y = 2; }
|
||||
|
||||
declare class m3d { foo(): void }
|
||||
module m3d { export var y = 2; }
|
||||
namespace m3d { export var y = 2; }
|
||||
|
||||
module m3e { export var y = 2; }
|
||||
namespace m3e { export var y = 2; }
|
||||
declare class m3e { foo(): void }
|
||||
|
||||
declare class m3f { foo(): void }
|
||||
module m3f { export interface I { foo(): void } }
|
||||
namespace m3f { export interface I { foo(): void } }
|
||||
|
||||
declare class m3g { foo(): void }
|
||||
module m3g { export class C { foo() { } } }
|
||||
namespace m3g { export class C { foo() { } } }
|
||||
|
||||
// module then enum
|
||||
// should be errors
|
||||
module m4 { }
|
||||
namespace m4 { }
|
||||
enum m4 { }
|
||||
|
||||
module m4a { var y = 2; }
|
||||
namespace m4a { var y = 2; }
|
||||
enum m4a { One }
|
||||
|
||||
module m4b { export var y = 2; }
|
||||
namespace m4b { export var y = 2; }
|
||||
enum m4b { One }
|
||||
|
||||
module m4c { interface I { foo(): void } }
|
||||
namespace m4c { interface I { foo(): void } }
|
||||
enum m4c { One }
|
||||
|
||||
module m4d { class C { foo() { } } }
|
||||
namespace m4d { class C { foo() { } } }
|
||||
enum m4d { One }
|
||||
|
||||
//// module then module
|
||||
|
||||
module m5 { export var y = 2; }
|
||||
module m5 { export interface I { foo(): void } } // should already be reasonably well covered
|
||||
namespace m5 { export var y = 2; }
|
||||
namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered
|
||||
|
||||
// module then import
|
||||
module m6 { export var y = 2; }
|
||||
namespace m6 { export var y = 2; }
|
||||
//import m6 = require('');
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
// module then function
|
||||
module m2 { }
|
||||
namespace m2 { }
|
||||
function m2() { }; // ok since the module is not instantiated
|
||||
|
||||
module m2a { var y = 2; }
|
||||
namespace m2a { var y = 2; }
|
||||
function m2a() { }; // error since the module is instantiated
|
||||
|
||||
module m2b { export var y = 2; }
|
||||
namespace m2b { export var y = 2; }
|
||||
function m2b() { }; // error since the module is instantiated
|
||||
|
||||
function m2c() { };
|
||||
module m2c { export var y = 2; }
|
||||
namespace m2c { export var y = 2; }
|
||||
|
||||
module m2cc { export var y = 2; }
|
||||
namespace m2cc { export var y = 2; }
|
||||
function m2cc() { }; // error to have module first
|
||||
|
||||
module m2d { }
|
||||
namespace m2d { }
|
||||
declare function m2d(): void;
|
||||
|
||||
declare function m2e(): void;
|
||||
module m2e { }
|
||||
namespace m2e { }
|
||||
|
||||
function m2f() { };
|
||||
module m2f { export interface I { foo(): void } }
|
||||
namespace m2f { export interface I { foo(): void } }
|
||||
|
||||
function m2g() { };
|
||||
module m2g { export class C { foo() { } } }
|
||||
namespace m2g { export class C { foo() { } } }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//// module then class
|
||||
module m3 { }
|
||||
namespace m3 { }
|
||||
class m3 { } // ok since the module is not instantiated
|
||||
|
||||
module m3a { var y = 2; }
|
||||
namespace m3a { var y = 2; }
|
||||
class m3a { foo() { } } // error, class isn't ambient or declared before the module
|
||||
@@ -1,17 +1,17 @@
|
||||
class m3b { foo() { } }
|
||||
module m3b { var y = 2; }
|
||||
namespace m3b { var y = 2; }
|
||||
|
||||
class m3c { foo() { } }
|
||||
module m3c { export var y = 2; }
|
||||
namespace m3c { export var y = 2; }
|
||||
|
||||
declare class m3d { foo(): void }
|
||||
module m3d { export var y = 2; }
|
||||
namespace m3d { export var y = 2; }
|
||||
|
||||
module m3e { export var y = 2; }
|
||||
namespace m3e { export var y = 2; }
|
||||
declare class m3e { foo(): void }
|
||||
|
||||
declare class m3f { foo(): void }
|
||||
module m3f { export interface I { foo(): void } }
|
||||
namespace m3f { export interface I { foo(): void } }
|
||||
|
||||
declare class m3g { foo(): void }
|
||||
module m3g { export class C { foo() { } } }
|
||||
namespace m3g { export class C { foo() { } } }
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// module then enum
|
||||
// should be errors
|
||||
module m4 { }
|
||||
namespace m4 { }
|
||||
enum m4 { }
|
||||
|
||||
module m4a { var y = 2; }
|
||||
namespace m4a { var y = 2; }
|
||||
enum m4a { One }
|
||||
|
||||
module m4b { export var y = 2; }
|
||||
namespace m4b { export var y = 2; }
|
||||
enum m4b { One }
|
||||
|
||||
module m4c { interface I { foo(): void } }
|
||||
namespace m4c { interface I { foo(): void } }
|
||||
enum m4c { One }
|
||||
|
||||
module m4d { class C { foo() { } } }
|
||||
namespace m4d { class C { foo() { } } }
|
||||
enum m4d { One }
|
||||
|
||||
//// module then module
|
||||
|
||||
module m5 { export var y = 2; }
|
||||
module m5 { export interface I { foo(): void } } // should already be reasonably well covered
|
||||
namespace m5 { export var y = 2; }
|
||||
namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered
|
||||
|
||||
@@ -22,13 +22,13 @@ enum x5 { One } // error
|
||||
|
||||
// var then module
|
||||
var x6 = 1;
|
||||
module x6 { } // ok since non-instantiated
|
||||
namespace x6 { } // ok since non-instantiated
|
||||
|
||||
var x6a = 1; // error
|
||||
module x6a { var y = 2; } // error since instantiated
|
||||
namespace x6a { var y = 2; } // error since instantiated
|
||||
|
||||
var x6b = 1; // error
|
||||
module x6b { export var y = 2; } // error
|
||||
namespace x6b { export var y = 2; } // error
|
||||
|
||||
// var then import, messes with other error reporting
|
||||
//var x7 = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export class C implements I {} // this should be an unresolved symbol I error
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @lib: es5
|
||||
declare var console;
|
||||
"use strict";
|
||||
module Test {
|
||||
namespace Test {
|
||||
export class Bug {
|
||||
getName():string {
|
||||
return "name";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M
|
||||
namespace M
|
||||
{
|
||||
class ClassA {}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Foo {
|
||||
namespace Foo {
|
||||
|
||||
export class Object {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M
|
||||
namespace M
|
||||
|
||||
{
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export class N { }
|
||||
export module N {
|
||||
export var v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
module M {
|
||||
namespace M {
|
||||
export class O extends M.N {
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
class C {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export class C {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class A {
|
||||
a: number;
|
||||
}
|
||||
module A {
|
||||
namespace A {
|
||||
export var v: string;
|
||||
}
|
||||
|
||||
module Foo {
|
||||
namespace Foo {
|
||||
var A = 1;
|
||||
class B extends A {
|
||||
b: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class A { a: number; }
|
||||
module Foo {
|
||||
namespace Foo {
|
||||
var A = 1;
|
||||
class B extends A { b: string; }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
module M {
|
||||
namespace M {
|
||||
export interface I1 {}
|
||||
export interface I2<T> {}
|
||||
}
|
||||
class C1 extends M.I1 {}
|
||||
class C2<T> extends M.I2<T> {}
|
||||
|
||||
module Mod {
|
||||
namespace Mod {
|
||||
export namespace Nested {
|
||||
export interface I {}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
module M1 {
|
||||
namespace M1 {
|
||||
export interface I {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
|
||||
module M2 {
|
||||
namespace M2 {
|
||||
import T = M1.I;
|
||||
class C implements T {
|
||||
foo() {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Editor {
|
||||
namespace Editor {
|
||||
|
||||
|
||||
export class List<T> {
|
||||
|
||||
@@ -38,7 +38,7 @@ class a {
|
||||
class b extends a {
|
||||
}
|
||||
|
||||
module m1 {
|
||||
namespace m1 {
|
||||
export class b {
|
||||
}
|
||||
class d {
|
||||
@@ -49,7 +49,7 @@ module m1 {
|
||||
}
|
||||
}
|
||||
|
||||
module m2 {
|
||||
namespace m2 {
|
||||
|
||||
export module m3 {
|
||||
export class c extends b {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//@module: commonjs
|
||||
module M {
|
||||
namespace M {
|
||||
class C { }
|
||||
interface C { }
|
||||
interface D { }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
module A {
|
||||
namespace A {
|
||||
export class B {
|
||||
foo() { }
|
||||
static bar() { }
|
||||
}
|
||||
}
|
||||
|
||||
module A {
|
||||
namespace A {
|
||||
export module B {
|
||||
export var x = 1;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user