mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into omitComments
Conflicts: src/compiler/emitter.ts
This commit is contained in:
@@ -9,9 +9,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe
|
||||
let blah = arguments[Symbol.iterator];
|
||||
>blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 2, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
let result = [];
|
||||
>result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 4, 7))
|
||||
|
||||
@@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]];
|
||||
|
||||
interface myArray extends Array<Number> { }
|
||||
>myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
interface myArray2 extends Array<Number|String> { }
|
||||
>myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[]
|
||||
>d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3))
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
var foo = async (): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
};
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
type MyPromise<T> = Promise<T>;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
|
||||
declare var MyPromise: typeof Promise;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare var mp: MyPromise<number>;
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
@@ -22,7 +22,7 @@ async function f0() { }
|
||||
|
||||
async function f1(): Promise<void> { }
|
||||
>f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 5, 23))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function f3(): MyPromise<void> { }
|
||||
>f3 : Symbol(f3, Decl(asyncAwait_es6.ts, 6, 38))
|
||||
@@ -33,7 +33,7 @@ let f4 = async function() { }
|
||||
|
||||
let f5 = async function(): Promise<void> { }
|
||||
>f5 : Symbol(f5, Decl(asyncAwait_es6.ts, 10, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
let f6 = async function(): MyPromise<void> { }
|
||||
>f6 : Symbol(f6, Decl(asyncAwait_es6.ts, 11, 3))
|
||||
@@ -44,7 +44,7 @@ let f7 = async () => { };
|
||||
|
||||
let f8 = async (): Promise<void> => { };
|
||||
>f8 : Symbol(f8, Decl(asyncAwait_es6.ts, 14, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
let f9 = async (): MyPromise<void> => { };
|
||||
>f9 : Symbol(f9, Decl(asyncAwait_es6.ts, 15, 3))
|
||||
@@ -60,7 +60,7 @@ let f11 = async () => mp;
|
||||
|
||||
let f12 = async (): Promise<number> => mp;
|
||||
>f12 : Symbol(f12, Decl(asyncAwait_es6.ts, 18, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
|
||||
let f13 = async (): MyPromise<number> => p;
|
||||
@@ -76,7 +76,7 @@ let o = {
|
||||
|
||||
async m2(): Promise<void> { },
|
||||
>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 22, 16))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 23, 31))
|
||||
@@ -92,7 +92,7 @@ class C {
|
||||
|
||||
async m2(): Promise<void> { }
|
||||
>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 28, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 29, 30))
|
||||
@@ -103,7 +103,7 @@ class C {
|
||||
|
||||
static async m5(): Promise<void> { }
|
||||
>m5 : Symbol(C.m5, Decl(asyncAwait_es6.ts, 31, 22))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
static async m6(): MyPromise<void> { }
|
||||
>m6 : Symbol(C.m6, Decl(asyncAwait_es6.ts, 32, 37))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts ===
|
||||
async function await(): Promise<void> {
|
||||
>await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = await p || a;
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = await p && a;
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: number;
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = await p + a;
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = await p, a;
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var o: { a: boolean; };
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(a, a, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(await p, a, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = fn(a, await p, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = (await pfn)(a, a, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(a, a, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(await p, a, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = o.fn(a, await p, a);
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43))
|
||||
@@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 4772, 1), Decl(lib.d.ts, 4858, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.d.ts, 5041, 1), Decl(lib.d.ts, 5127, 11))
|
||||
|
||||
"before";
|
||||
var b = (await po).fn(a, a, a);
|
||||
|
||||
@@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc");
|
||||
>a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3))
|
||||
|
||||
(<Function>xa[1].foo)(...[1, 2, "abc"]);
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1368, 1))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 4009, 1))
|
||||
>xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13))
|
||||
>xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3))
|
||||
>foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13))
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/compiler/commonjsSafeImport.ts] ////
|
||||
|
||||
//// [10_lib.ts]
|
||||
|
||||
export function Foo() {}
|
||||
|
||||
//// [main.ts]
|
||||
import { Foo } from './10_lib';
|
||||
|
||||
Foo();
|
||||
|
||||
|
||||
//// [10_lib.js]
|
||||
function Foo() { }
|
||||
exports.Foo = Foo;
|
||||
//// [main.js]
|
||||
var _10_lib_1 = require('./10_lib');
|
||||
_10_lib_1.Foo();
|
||||
|
||||
|
||||
//// [10_lib.d.ts]
|
||||
export declare function Foo(): void;
|
||||
//// [main.d.ts]
|
||||
@@ -0,0 +1,12 @@
|
||||
=== tests/cases/compiler/10_lib.ts ===
|
||||
|
||||
export function Foo() {}
|
||||
>Foo : Symbol(Foo, Decl(10_lib.ts, 0, 0))
|
||||
|
||||
=== tests/cases/compiler/main.ts ===
|
||||
import { Foo } from './10_lib';
|
||||
>Foo : Symbol(Foo, Decl(main.ts, 0, 8))
|
||||
|
||||
Foo();
|
||||
>Foo : Symbol(Foo, Decl(main.ts, 0, 8))
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/10_lib.ts ===
|
||||
|
||||
export function Foo() {}
|
||||
>Foo : () => void
|
||||
|
||||
=== tests/cases/compiler/main.ts ===
|
||||
import { Foo } from './10_lib';
|
||||
>Foo : () => void
|
||||
|
||||
Foo();
|
||||
>Foo() : void
|
||||
>Foo : () => void
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [computedPropertyNamesSourceMap2_ES5.js.map]
|
||||
{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":["[\"hello\"]"],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC;QACLA,QAAQA,CAACA;IACbA,CAACA;;CACJ,CAAA"}
|
||||
{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":["[\"hello\"]"],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC,GAAT;QACIA,QAAQA,CAACA;IACbA,CAACA;;CACJ,CAAA"}
|
||||
@@ -28,26 +28,28 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^
|
||||
4 > ^
|
||||
5 > ^^^->
|
||||
5 > ^^^
|
||||
1->{
|
||||
>
|
||||
2 > [
|
||||
3 > "hello"
|
||||
4 > ]
|
||||
5 >
|
||||
1->Emitted(2, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(2, 15) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(2, 16) Source(2, 14) + SourceIndex(0)
|
||||
5 >Emitted(2, 19) Source(2, 5) + SourceIndex(0)
|
||||
---
|
||||
>>> debugger;
|
||||
1->^^^^^^^^
|
||||
1 >^^^^^^^^
|
||||
2 > ^^^^^^^^
|
||||
3 > ^
|
||||
1->() {
|
||||
1 >["hello"]() {
|
||||
>
|
||||
2 > debugger
|
||||
3 > ;
|
||||
1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (["hello"])
|
||||
1 >Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (["hello"])
|
||||
2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (["hello"])
|
||||
3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) name (["hello"])
|
||||
---
|
||||
|
||||
@@ -82,5 +82,7 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
|
||||
>IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1))
|
||||
>IWithCallSignatures4 : Symbol(IWithCallSignatures4, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 18, 1))
|
||||
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
|
||||
>a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
|
||||
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
|
||||
>toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
|
||||
>x4 : IWithCallSignatures | IWithCallSignatures4
|
||||
>IWithCallSignatures : IWithCallSignatures
|
||||
>IWithCallSignatures4 : IWithCallSignatures4
|
||||
>a => /*here a should be any*/ a.toString() : (a: any) => any
|
||||
>a : any
|
||||
>a.toString() : any
|
||||
>a.toString : any
|
||||
>a : any
|
||||
>toString : any
|
||||
>a => /*here a should be any*/ a.toString() : (a: number) => string
|
||||
>a : number
|
||||
>a.toString() : string
|
||||
>a.toString : (radix?: number) => string
|
||||
>a : number
|
||||
>toString : (radix?: number) => string
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,8 +10,7 @@ sourceFile:contextualTyping.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>// CONTEXT: Class property declaration
|
||||
1 >
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 >// DEFAULT INTERFACES
|
||||
>interface IFoo {
|
||||
> n: number;
|
||||
@@ -24,21 +23,23 @@ sourceFile:contextualTyping.ts
|
||||
> foo: IFoo;
|
||||
>}
|
||||
>
|
||||
>// CONTEXT: Class property declaration
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Class property declaration
|
||||
1 >Emitted(1, 1) Source(14, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 1) Source(13, 1) + SourceIndex(0)
|
||||
3 >Emitted(1, 39) Source(13, 39) + SourceIndex(0)
|
||||
2 >// CONTEXT: Class property declaration
|
||||
1 >Emitted(1, 1) Source(13, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 39) Source(13, 39) + SourceIndex(0)
|
||||
---
|
||||
>>>var C1T5 = (function () {
|
||||
>>> function C1T5() {
|
||||
1 >^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
1 >Emitted(3, 5) Source(14, 1) + SourceIndex(0) name (C1T5)
|
||||
1 >Emitted(2, 1) Source(14, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> function C1T5() {
|
||||
1->^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
1->Emitted(3, 5) Source(14, 1) + SourceIndex(0) name (C1T5)
|
||||
---
|
||||
>>> this.foo = function (i) {
|
||||
1->^^^^^^^^
|
||||
@@ -127,17 +128,13 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Module property declaration
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Module property declaration
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Module property declaration
|
||||
1->Emitted(10, 1) Source(21, 1) + SourceIndex(0)
|
||||
2 >Emitted(10, 1) Source(20, 1) + SourceIndex(0)
|
||||
3 >Emitted(10, 40) Source(20, 40) + SourceIndex(0)
|
||||
2 >// CONTEXT: Module property declaration
|
||||
1->Emitted(10, 1) Source(20, 1) + SourceIndex(0)
|
||||
2 >Emitted(10, 40) Source(20, 40) + SourceIndex(0)
|
||||
---
|
||||
>>>var C2T5;
|
||||
1 >
|
||||
@@ -257,66 +254,65 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Variable declaration
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^^^^^^^^^->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Variable declaration
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Variable declaration
|
||||
1->Emitted(17, 1) Source(28, 1) + SourceIndex(0)
|
||||
2 >Emitted(17, 1) Source(27, 1) + SourceIndex(0)
|
||||
3 >Emitted(17, 33) Source(27, 33) + SourceIndex(0)
|
||||
2 >// CONTEXT: Variable declaration
|
||||
1->Emitted(17, 1) Source(27, 1) + SourceIndex(0)
|
||||
2 >Emitted(17, 33) Source(27, 33) + SourceIndex(0)
|
||||
---
|
||||
>>>var c3t1 = (function (s) { return s; });
|
||||
1->^^^^
|
||||
2 > ^^^^
|
||||
3 > ^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^
|
||||
7 > ^^^^
|
||||
8 > ^^^^^^
|
||||
9 > ^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^
|
||||
14> ^
|
||||
15> ^
|
||||
1->
|
||||
2 >^^^^
|
||||
3 > ^^^^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^
|
||||
7 > ^
|
||||
8 > ^^^^
|
||||
9 > ^^^^^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^
|
||||
14> ^
|
||||
15> ^
|
||||
16> ^
|
||||
1->
|
||||
>var
|
||||
2 > c3t1
|
||||
3 > : (s: string) => string =
|
||||
4 > (
|
||||
5 > function(
|
||||
6 > s
|
||||
7 > ) {
|
||||
8 > return
|
||||
9 >
|
||||
10> s
|
||||
11>
|
||||
12>
|
||||
13> }
|
||||
14> )
|
||||
15> ;
|
||||
1->Emitted(18, 5) Source(28, 5) + SourceIndex(0)
|
||||
2 >Emitted(18, 9) Source(28, 9) + SourceIndex(0)
|
||||
3 >Emitted(18, 12) Source(28, 35) + SourceIndex(0)
|
||||
4 >Emitted(18, 13) Source(28, 36) + SourceIndex(0)
|
||||
5 >Emitted(18, 23) Source(28, 45) + SourceIndex(0)
|
||||
6 >Emitted(18, 24) Source(28, 46) + SourceIndex(0)
|
||||
7 >Emitted(18, 28) Source(28, 50) + SourceIndex(0)
|
||||
8 >Emitted(18, 34) Source(28, 56) + SourceIndex(0)
|
||||
9 >Emitted(18, 35) Source(28, 57) + SourceIndex(0)
|
||||
10>Emitted(18, 36) Source(28, 58) + SourceIndex(0)
|
||||
11>Emitted(18, 37) Source(28, 58) + SourceIndex(0)
|
||||
12>Emitted(18, 38) Source(28, 59) + SourceIndex(0)
|
||||
13>Emitted(18, 39) Source(28, 60) + SourceIndex(0)
|
||||
14>Emitted(18, 40) Source(28, 61) + SourceIndex(0)
|
||||
15>Emitted(18, 41) Source(28, 62) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > c3t1
|
||||
4 > : (s: string) => string =
|
||||
5 > (
|
||||
6 > function(
|
||||
7 > s
|
||||
8 > ) {
|
||||
9 > return
|
||||
10>
|
||||
11> s
|
||||
12>
|
||||
13>
|
||||
14> }
|
||||
15> )
|
||||
16> ;
|
||||
1->Emitted(18, 1) Source(28, 1) + SourceIndex(0)
|
||||
2 >Emitted(18, 5) Source(28, 5) + SourceIndex(0)
|
||||
3 >Emitted(18, 9) Source(28, 9) + SourceIndex(0)
|
||||
4 >Emitted(18, 12) Source(28, 35) + SourceIndex(0)
|
||||
5 >Emitted(18, 13) Source(28, 36) + SourceIndex(0)
|
||||
6 >Emitted(18, 23) Source(28, 45) + SourceIndex(0)
|
||||
7 >Emitted(18, 24) Source(28, 46) + SourceIndex(0)
|
||||
8 >Emitted(18, 28) Source(28, 50) + SourceIndex(0)
|
||||
9 >Emitted(18, 34) Source(28, 56) + SourceIndex(0)
|
||||
10>Emitted(18, 35) Source(28, 57) + SourceIndex(0)
|
||||
11>Emitted(18, 36) Source(28, 58) + SourceIndex(0)
|
||||
12>Emitted(18, 37) Source(28, 58) + SourceIndex(0)
|
||||
13>Emitted(18, 38) Source(28, 59) + SourceIndex(0)
|
||||
14>Emitted(18, 39) Source(28, 60) + SourceIndex(0)
|
||||
15>Emitted(18, 40) Source(28, 61) + SourceIndex(0)
|
||||
16>Emitted(18, 41) Source(28, 62) + SourceIndex(0)
|
||||
---
|
||||
>>>var c3t2 = ({
|
||||
1 >
|
||||
@@ -945,27 +941,28 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Class property assignment
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Class property assignment
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Class property assignment
|
||||
1->Emitted(40, 1) Source(56, 1) + SourceIndex(0)
|
||||
2 >Emitted(40, 1) Source(55, 1) + SourceIndex(0)
|
||||
3 >Emitted(40, 38) Source(55, 38) + SourceIndex(0)
|
||||
2 >// CONTEXT: Class property assignment
|
||||
1->Emitted(40, 1) Source(55, 1) + SourceIndex(0)
|
||||
2 >Emitted(40, 38) Source(55, 38) + SourceIndex(0)
|
||||
---
|
||||
>>>var C4T5 = (function () {
|
||||
>>> function C4T5() {
|
||||
1 >^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>class C4T5 {
|
||||
>
|
||||
1 >Emitted(41, 1) Source(56, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> function C4T5() {
|
||||
1->^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->class C4T5 {
|
||||
> foo: (i: number, s: string) => string;
|
||||
>
|
||||
1 >Emitted(42, 5) Source(58, 5) + SourceIndex(0) name (C4T5)
|
||||
1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) name (C4T5)
|
||||
---
|
||||
>>> this.foo = function (i, s) {
|
||||
1->^^^^^^^^
|
||||
@@ -1070,17 +1067,13 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Module property assignment
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Module property assignment
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Module property assignment
|
||||
1->Emitted(49, 1) Source(66, 1) + SourceIndex(0)
|
||||
2 >Emitted(49, 1) Source(65, 1) + SourceIndex(0)
|
||||
3 >Emitted(49, 39) Source(65, 39) + SourceIndex(0)
|
||||
2 >// CONTEXT: Module property assignment
|
||||
1->Emitted(49, 1) Source(65, 1) + SourceIndex(0)
|
||||
2 >Emitted(49, 39) Source(65, 39) + SourceIndex(0)
|
||||
---
|
||||
>>>var C5T5;
|
||||
1 >
|
||||
@@ -1209,30 +1202,29 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Variable assignment
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Variable assignment
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Variable assignment
|
||||
1->Emitted(56, 1) Source(74, 1) + SourceIndex(0)
|
||||
2 >Emitted(56, 1) Source(73, 1) + SourceIndex(0)
|
||||
3 >Emitted(56, 32) Source(73, 32) + SourceIndex(0)
|
||||
2 >// CONTEXT: Variable assignment
|
||||
1->Emitted(56, 1) Source(73, 1) + SourceIndex(0)
|
||||
2 >Emitted(56, 32) Source(73, 32) + SourceIndex(0)
|
||||
---
|
||||
>>>var c6t5;
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var
|
||||
2 > c6t5: (n: number) => IFoo
|
||||
3 > ;
|
||||
1 >Emitted(57, 5) Source(74, 5) + SourceIndex(0)
|
||||
2 >Emitted(57, 9) Source(74, 30) + SourceIndex(0)
|
||||
3 >Emitted(57, 10) Source(74, 31) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > c6t5: (n: number) => IFoo
|
||||
4 > ;
|
||||
1 >Emitted(57, 1) Source(74, 1) + SourceIndex(0)
|
||||
2 >Emitted(57, 5) Source(74, 5) + SourceIndex(0)
|
||||
3 >Emitted(57, 9) Source(74, 30) + SourceIndex(0)
|
||||
4 >Emitted(57, 10) Source(74, 31) + SourceIndex(0)
|
||||
---
|
||||
>>>c6t5 = function (n) { return ({}); };
|
||||
1->
|
||||
@@ -1284,30 +1276,29 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Array index assignment
|
||||
1 >
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 >
|
||||
>
|
||||
>// CONTEXT: Array index assignment
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Array index assignment
|
||||
1 >Emitted(59, 1) Source(78, 1) + SourceIndex(0)
|
||||
2 >Emitted(59, 1) Source(77, 1) + SourceIndex(0)
|
||||
3 >Emitted(59, 35) Source(77, 35) + SourceIndex(0)
|
||||
2 >// CONTEXT: Array index assignment
|
||||
1 >Emitted(59, 1) Source(77, 1) + SourceIndex(0)
|
||||
2 >Emitted(59, 35) Source(77, 35) + SourceIndex(0)
|
||||
---
|
||||
>>>var c7t2;
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var
|
||||
2 > c7t2: IFoo[]
|
||||
3 > ;
|
||||
1 >Emitted(60, 5) Source(78, 5) + SourceIndex(0)
|
||||
2 >Emitted(60, 9) Source(78, 17) + SourceIndex(0)
|
||||
3 >Emitted(60, 10) Source(78, 18) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > c7t2: IFoo[]
|
||||
4 > ;
|
||||
1 >Emitted(60, 1) Source(78, 1) + SourceIndex(0)
|
||||
2 >Emitted(60, 5) Source(78, 5) + SourceIndex(0)
|
||||
3 >Emitted(60, 9) Source(78, 17) + SourceIndex(0)
|
||||
4 >Emitted(60, 10) Source(78, 18) + SourceIndex(0)
|
||||
---
|
||||
>>>c7t2[0] = ({ n: 1 });
|
||||
1->
|
||||
@@ -2140,31 +2131,30 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Function call
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
>// CONTEXT: Function call
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Function call
|
||||
1->Emitted(85, 1) Source(146, 1) + SourceIndex(0)
|
||||
2 >Emitted(85, 1) Source(145, 1) + SourceIndex(0)
|
||||
3 >Emitted(85, 26) Source(145, 26) + SourceIndex(0)
|
||||
2 >// CONTEXT: Function call
|
||||
1->Emitted(85, 1) Source(145, 1) + SourceIndex(0)
|
||||
2 >Emitted(85, 26) Source(145, 26) + SourceIndex(0)
|
||||
---
|
||||
>>>function c9t5(f) { }
|
||||
1 >^^^^^^^^^^^^^^
|
||||
2 > ^
|
||||
3 > ^^^^
|
||||
4 > ^
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^
|
||||
5 > ^
|
||||
1 >
|
||||
>function c9t5(
|
||||
2 > f: (n: number) => IFoo
|
||||
3 > ) {
|
||||
4 > }
|
||||
1 >Emitted(86, 15) Source(146, 15) + SourceIndex(0)
|
||||
2 >Emitted(86, 16) Source(146, 37) + SourceIndex(0)
|
||||
3 >Emitted(86, 20) Source(146, 40) + SourceIndex(0) name (c9t5)
|
||||
4 >Emitted(86, 21) Source(146, 41) + SourceIndex(0) name (c9t5)
|
||||
>
|
||||
2 >function c9t5(
|
||||
3 > f: (n: number) => IFoo
|
||||
4 > ) {
|
||||
5 > }
|
||||
1 >Emitted(86, 1) Source(146, 1) + SourceIndex(0)
|
||||
2 >Emitted(86, 15) Source(146, 15) + SourceIndex(0)
|
||||
3 >Emitted(86, 16) Source(146, 37) + SourceIndex(0)
|
||||
4 >Emitted(86, 20) Source(146, 40) + SourceIndex(0) name (c9t5)
|
||||
5 >Emitted(86, 21) Source(146, 41) + SourceIndex(0) name (c9t5)
|
||||
---
|
||||
>>>;
|
||||
1 >
|
||||
@@ -2236,107 +2226,107 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Return statement
|
||||
1->
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
>// CONTEXT: Return statement
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Return statement
|
||||
1->Emitted(91, 1) Source(152, 1) + SourceIndex(0)
|
||||
2 >Emitted(91, 1) Source(151, 1) + SourceIndex(0)
|
||||
3 >Emitted(91, 29) Source(151, 29) + SourceIndex(0)
|
||||
2 >// CONTEXT: Return statement
|
||||
1->Emitted(91, 1) Source(151, 1) + SourceIndex(0)
|
||||
2 >Emitted(91, 29) Source(151, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>var c10t5 = function () { return function (n) { return ({}); }; };
|
||||
1->^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^
|
||||
4 > ^^^^^^^^^^^^^^
|
||||
5 > ^^^^^^
|
||||
6 > ^
|
||||
7 > ^^^^^^^^^^
|
||||
8 > ^
|
||||
9 > ^^^^
|
||||
10> ^^^^^^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^^
|
||||
14> ^
|
||||
15> ^
|
||||
16> ^
|
||||
17> ^
|
||||
18> ^
|
||||
19> ^
|
||||
20> ^
|
||||
21> ^
|
||||
1->
|
||||
2 >^^^^
|
||||
3 > ^^^^^
|
||||
4 > ^^^
|
||||
5 > ^^^^^^^^^^^^^^
|
||||
6 > ^^^^^^
|
||||
7 > ^
|
||||
8 > ^^^^^^^^^^
|
||||
9 > ^
|
||||
10> ^^^^
|
||||
11> ^^^^^^
|
||||
12> ^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^
|
||||
16> ^
|
||||
17> ^
|
||||
18> ^
|
||||
19> ^
|
||||
20> ^
|
||||
21> ^
|
||||
22> ^
|
||||
1->
|
||||
>var
|
||||
2 > c10t5
|
||||
3 > : () => (n: number) => IFoo =
|
||||
4 > function() {
|
||||
5 > return
|
||||
6 >
|
||||
7 > function(
|
||||
8 > n
|
||||
9 > ) {
|
||||
10> return
|
||||
11> <IFoo>
|
||||
12> (
|
||||
13> {}
|
||||
14> )
|
||||
15>
|
||||
16>
|
||||
17> }
|
||||
18>
|
||||
19>
|
||||
20> }
|
||||
21> ;
|
||||
1->Emitted(92, 5) Source(152, 5) + SourceIndex(0)
|
||||
2 >Emitted(92, 10) Source(152, 10) + SourceIndex(0)
|
||||
3 >Emitted(92, 13) Source(152, 40) + SourceIndex(0)
|
||||
4 >Emitted(92, 27) Source(152, 53) + SourceIndex(0)
|
||||
5 >Emitted(92, 33) Source(152, 59) + SourceIndex(0)
|
||||
6 >Emitted(92, 34) Source(152, 60) + SourceIndex(0)
|
||||
7 >Emitted(92, 44) Source(152, 69) + SourceIndex(0)
|
||||
8 >Emitted(92, 45) Source(152, 70) + SourceIndex(0)
|
||||
9 >Emitted(92, 49) Source(152, 74) + SourceIndex(0)
|
||||
10>Emitted(92, 55) Source(152, 80) + SourceIndex(0)
|
||||
11>Emitted(92, 56) Source(152, 87) + SourceIndex(0)
|
||||
12>Emitted(92, 57) Source(152, 88) + SourceIndex(0)
|
||||
13>Emitted(92, 59) Source(152, 90) + SourceIndex(0)
|
||||
14>Emitted(92, 60) Source(152, 91) + SourceIndex(0)
|
||||
15>Emitted(92, 61) Source(152, 91) + SourceIndex(0)
|
||||
16>Emitted(92, 62) Source(152, 92) + SourceIndex(0)
|
||||
17>Emitted(92, 63) Source(152, 93) + SourceIndex(0)
|
||||
18>Emitted(92, 64) Source(152, 93) + SourceIndex(0)
|
||||
19>Emitted(92, 65) Source(152, 94) + SourceIndex(0)
|
||||
20>Emitted(92, 66) Source(152, 95) + SourceIndex(0)
|
||||
21>Emitted(92, 67) Source(152, 96) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > c10t5
|
||||
4 > : () => (n: number) => IFoo =
|
||||
5 > function() {
|
||||
6 > return
|
||||
7 >
|
||||
8 > function(
|
||||
9 > n
|
||||
10> ) {
|
||||
11> return
|
||||
12> <IFoo>
|
||||
13> (
|
||||
14> {}
|
||||
15> )
|
||||
16>
|
||||
17>
|
||||
18> }
|
||||
19>
|
||||
20>
|
||||
21> }
|
||||
22> ;
|
||||
1->Emitted(92, 1) Source(152, 1) + SourceIndex(0)
|
||||
2 >Emitted(92, 5) Source(152, 5) + SourceIndex(0)
|
||||
3 >Emitted(92, 10) Source(152, 10) + SourceIndex(0)
|
||||
4 >Emitted(92, 13) Source(152, 40) + SourceIndex(0)
|
||||
5 >Emitted(92, 27) Source(152, 53) + SourceIndex(0)
|
||||
6 >Emitted(92, 33) Source(152, 59) + SourceIndex(0)
|
||||
7 >Emitted(92, 34) Source(152, 60) + SourceIndex(0)
|
||||
8 >Emitted(92, 44) Source(152, 69) + SourceIndex(0)
|
||||
9 >Emitted(92, 45) Source(152, 70) + SourceIndex(0)
|
||||
10>Emitted(92, 49) Source(152, 74) + SourceIndex(0)
|
||||
11>Emitted(92, 55) Source(152, 80) + SourceIndex(0)
|
||||
12>Emitted(92, 56) Source(152, 87) + SourceIndex(0)
|
||||
13>Emitted(92, 57) Source(152, 88) + SourceIndex(0)
|
||||
14>Emitted(92, 59) Source(152, 90) + SourceIndex(0)
|
||||
15>Emitted(92, 60) Source(152, 91) + SourceIndex(0)
|
||||
16>Emitted(92, 61) Source(152, 91) + SourceIndex(0)
|
||||
17>Emitted(92, 62) Source(152, 92) + SourceIndex(0)
|
||||
18>Emitted(92, 63) Source(152, 93) + SourceIndex(0)
|
||||
19>Emitted(92, 64) Source(152, 93) + SourceIndex(0)
|
||||
20>Emitted(92, 65) Source(152, 94) + SourceIndex(0)
|
||||
21>Emitted(92, 66) Source(152, 95) + SourceIndex(0)
|
||||
22>Emitted(92, 67) Source(152, 96) + SourceIndex(0)
|
||||
---
|
||||
>>>// CONTEXT: Newing a class
|
||||
1 >
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^->
|
||||
1 >
|
||||
>
|
||||
>// CONTEXT: Newing a class
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Newing a class
|
||||
1 >Emitted(93, 1) Source(155, 1) + SourceIndex(0)
|
||||
2 >Emitted(93, 1) Source(154, 1) + SourceIndex(0)
|
||||
3 >Emitted(93, 27) Source(154, 27) + SourceIndex(0)
|
||||
2 >// CONTEXT: Newing a class
|
||||
1 >Emitted(93, 1) Source(154, 1) + SourceIndex(0)
|
||||
2 >Emitted(93, 27) Source(154, 27) + SourceIndex(0)
|
||||
---
|
||||
>>>var C11t5 = (function () {
|
||||
1->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
1->Emitted(94, 1) Source(155, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> function C11t5(f) {
|
||||
1->^^^^
|
||||
2 > ^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
1->
|
||||
>class C11t5 {
|
||||
1->class C11t5 {
|
||||
2 > constructor(
|
||||
3 > f: (n: number) => IFoo
|
||||
1->Emitted(95, 5) Source(155, 15) + SourceIndex(0) name (C11t5)
|
||||
@@ -2448,66 +2438,65 @@ sourceFile:contextualTyping.ts
|
||||
---
|
||||
>>>// CONTEXT: Type annotated expression
|
||||
1 >
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^^^^^->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^^^^->
|
||||
1 >
|
||||
>
|
||||
>// CONTEXT: Type annotated expression
|
||||
>
|
||||
2 >
|
||||
3 >// CONTEXT: Type annotated expression
|
||||
1 >Emitted(101, 1) Source(159, 1) + SourceIndex(0)
|
||||
2 >Emitted(101, 1) Source(158, 1) + SourceIndex(0)
|
||||
3 >Emitted(101, 38) Source(158, 38) + SourceIndex(0)
|
||||
2 >// CONTEXT: Type annotated expression
|
||||
1 >Emitted(101, 1) Source(158, 1) + SourceIndex(0)
|
||||
2 >Emitted(101, 38) Source(158, 38) + SourceIndex(0)
|
||||
---
|
||||
>>>var c12t1 = (function (s) { return s; });
|
||||
1->^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^
|
||||
7 > ^^^^
|
||||
8 > ^^^^^^
|
||||
9 > ^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^
|
||||
14> ^
|
||||
15> ^
|
||||
1->
|
||||
2 >^^^^
|
||||
3 > ^^^^^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^
|
||||
7 > ^
|
||||
8 > ^^^^
|
||||
9 > ^^^^^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^
|
||||
14> ^
|
||||
15> ^
|
||||
16> ^
|
||||
1->
|
||||
>var
|
||||
2 > c12t1
|
||||
3 > = <(s: string) => string>
|
||||
4 > (
|
||||
5 > function(
|
||||
6 > s
|
||||
7 > ) {
|
||||
8 > return
|
||||
9 >
|
||||
10> s
|
||||
11>
|
||||
12>
|
||||
13> }
|
||||
14> )
|
||||
15> ;
|
||||
1->Emitted(102, 5) Source(159, 5) + SourceIndex(0)
|
||||
2 >Emitted(102, 10) Source(159, 10) + SourceIndex(0)
|
||||
3 >Emitted(102, 13) Source(159, 37) + SourceIndex(0)
|
||||
4 >Emitted(102, 14) Source(159, 38) + SourceIndex(0)
|
||||
5 >Emitted(102, 24) Source(159, 47) + SourceIndex(0)
|
||||
6 >Emitted(102, 25) Source(159, 48) + SourceIndex(0)
|
||||
7 >Emitted(102, 29) Source(159, 52) + SourceIndex(0)
|
||||
8 >Emitted(102, 35) Source(159, 58) + SourceIndex(0)
|
||||
9 >Emitted(102, 36) Source(159, 59) + SourceIndex(0)
|
||||
10>Emitted(102, 37) Source(159, 60) + SourceIndex(0)
|
||||
11>Emitted(102, 38) Source(159, 60) + SourceIndex(0)
|
||||
12>Emitted(102, 39) Source(159, 61) + SourceIndex(0)
|
||||
13>Emitted(102, 40) Source(159, 62) + SourceIndex(0)
|
||||
14>Emitted(102, 41) Source(159, 63) + SourceIndex(0)
|
||||
15>Emitted(102, 42) Source(159, 64) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > c12t1
|
||||
4 > = <(s: string) => string>
|
||||
5 > (
|
||||
6 > function(
|
||||
7 > s
|
||||
8 > ) {
|
||||
9 > return
|
||||
10>
|
||||
11> s
|
||||
12>
|
||||
13>
|
||||
14> }
|
||||
15> )
|
||||
16> ;
|
||||
1->Emitted(102, 1) Source(159, 1) + SourceIndex(0)
|
||||
2 >Emitted(102, 5) Source(159, 5) + SourceIndex(0)
|
||||
3 >Emitted(102, 10) Source(159, 10) + SourceIndex(0)
|
||||
4 >Emitted(102, 13) Source(159, 37) + SourceIndex(0)
|
||||
5 >Emitted(102, 14) Source(159, 38) + SourceIndex(0)
|
||||
6 >Emitted(102, 24) Source(159, 47) + SourceIndex(0)
|
||||
7 >Emitted(102, 25) Source(159, 48) + SourceIndex(0)
|
||||
8 >Emitted(102, 29) Source(159, 52) + SourceIndex(0)
|
||||
9 >Emitted(102, 35) Source(159, 58) + SourceIndex(0)
|
||||
10>Emitted(102, 36) Source(159, 59) + SourceIndex(0)
|
||||
11>Emitted(102, 37) Source(159, 60) + SourceIndex(0)
|
||||
12>Emitted(102, 38) Source(159, 60) + SourceIndex(0)
|
||||
13>Emitted(102, 39) Source(159, 61) + SourceIndex(0)
|
||||
14>Emitted(102, 40) Source(159, 62) + SourceIndex(0)
|
||||
15>Emitted(102, 41) Source(159, 63) + SourceIndex(0)
|
||||
16>Emitted(102, 42) Source(159, 64) + SourceIndex(0)
|
||||
---
|
||||
>>>var c12t2 = ({
|
||||
1 >
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//// [tests/cases/compiler/declarationEmit_exportAssignment.ts] ////
|
||||
|
||||
//// [utils.ts]
|
||||
|
||||
export function foo() { }
|
||||
export function bar() { }
|
||||
export interface Buzz { }
|
||||
|
||||
//// [index.ts]
|
||||
import {foo} from "utils";
|
||||
export = foo;
|
||||
|
||||
//// [utils.js]
|
||||
function foo() { }
|
||||
exports.foo = foo;
|
||||
function bar() { }
|
||||
exports.bar = bar;
|
||||
//// [index.js]
|
||||
var utils_1 = require("utils");
|
||||
module.exports = utils_1.foo;
|
||||
|
||||
|
||||
//// [utils.d.ts]
|
||||
export declare function foo(): void;
|
||||
export declare function bar(): void;
|
||||
export interface Buzz {
|
||||
}
|
||||
//// [index.d.ts]
|
||||
import { foo } from "utils";
|
||||
export = foo;
|
||||
@@ -0,0 +1,18 @@
|
||||
=== tests/cases/compiler/utils.ts ===
|
||||
|
||||
export function foo() { }
|
||||
>foo : Symbol(foo, Decl(utils.ts, 0, 0))
|
||||
|
||||
export function bar() { }
|
||||
>bar : Symbol(bar, Decl(utils.ts, 1, 25))
|
||||
|
||||
export interface Buzz { }
|
||||
>Buzz : Symbol(Buzz, Decl(utils.ts, 2, 25))
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import {foo} from "utils";
|
||||
>foo : Symbol(foo, Decl(index.ts, 0, 8))
|
||||
|
||||
export = foo;
|
||||
>foo : Symbol(foo, Decl(index.ts, 0, 8))
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
=== tests/cases/compiler/utils.ts ===
|
||||
|
||||
export function foo() { }
|
||||
>foo : () => void
|
||||
|
||||
export function bar() { }
|
||||
>bar : () => void
|
||||
|
||||
export interface Buzz { }
|
||||
>Buzz : Buzz
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import {foo} from "utils";
|
||||
>foo : () => void
|
||||
|
||||
export = foo;
|
||||
>foo : () => void
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//// [tests/cases/compiler/declarationEmit_exportDeclaration.ts] ////
|
||||
|
||||
//// [utils.ts]
|
||||
|
||||
export function foo() { }
|
||||
export function bar() { }
|
||||
export interface Buzz { }
|
||||
|
||||
//// [index.ts]
|
||||
import {foo, bar, Buzz} from "utils";
|
||||
|
||||
foo();
|
||||
let obj: Buzz;
|
||||
export {bar};
|
||||
|
||||
//// [utils.js]
|
||||
function foo() { }
|
||||
exports.foo = foo;
|
||||
function bar() { }
|
||||
exports.bar = bar;
|
||||
//// [index.js]
|
||||
var utils_1 = require("utils");
|
||||
exports.bar = utils_1.bar;
|
||||
utils_1.foo();
|
||||
var obj;
|
||||
|
||||
|
||||
//// [utils.d.ts]
|
||||
export declare function foo(): void;
|
||||
export declare function bar(): void;
|
||||
export interface Buzz {
|
||||
}
|
||||
//// [index.d.ts]
|
||||
import { bar } from "utils";
|
||||
export { bar };
|
||||
@@ -0,0 +1,27 @@
|
||||
=== tests/cases/compiler/utils.ts ===
|
||||
|
||||
export function foo() { }
|
||||
>foo : Symbol(foo, Decl(utils.ts, 0, 0))
|
||||
|
||||
export function bar() { }
|
||||
>bar : Symbol(bar, Decl(utils.ts, 1, 25))
|
||||
|
||||
export interface Buzz { }
|
||||
>Buzz : Symbol(Buzz, Decl(utils.ts, 2, 25))
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import {foo, bar, Buzz} from "utils";
|
||||
>foo : Symbol(foo, Decl(index.ts, 0, 8))
|
||||
>bar : Symbol(bar, Decl(index.ts, 0, 12))
|
||||
>Buzz : Symbol(Buzz, Decl(index.ts, 0, 17))
|
||||
|
||||
foo();
|
||||
>foo : Symbol(foo, Decl(index.ts, 0, 8))
|
||||
|
||||
let obj: Buzz;
|
||||
>obj : Symbol(obj, Decl(index.ts, 3, 3))
|
||||
>Buzz : Symbol(Buzz, Decl(index.ts, 0, 17))
|
||||
|
||||
export {bar};
|
||||
>bar : Symbol(bar, Decl(index.ts, 4, 8))
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
=== tests/cases/compiler/utils.ts ===
|
||||
|
||||
export function foo() { }
|
||||
>foo : () => void
|
||||
|
||||
export function bar() { }
|
||||
>bar : () => void
|
||||
|
||||
export interface Buzz { }
|
||||
>Buzz : Buzz
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import {foo, bar, Buzz} from "utils";
|
||||
>foo : () => void
|
||||
>bar : () => void
|
||||
>Buzz : any
|
||||
|
||||
foo();
|
||||
>foo() : void
|
||||
>foo : () => void
|
||||
|
||||
let obj: Buzz;
|
||||
>obj : Buzz
|
||||
>Buzz : Buzz
|
||||
|
||||
export {bar};
|
||||
>bar : () => void
|
||||
|
||||
@@ -34,6 +34,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var service_1 = require("./service");
|
||||
var MyComponent = (function () {
|
||||
function MyComponent(Service) {
|
||||
this.Service = Service;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
//// [decoratorMetadataWithConstructorType.ts]
|
||||
|
||||
declare var console: {
|
||||
log(msg: string): void;
|
||||
};
|
||||
|
||||
class A {
|
||||
constructor() { console.log('new A'); }
|
||||
}
|
||||
|
||||
function decorator(target: Object, propertyKey: string) {
|
||||
}
|
||||
|
||||
export class B {
|
||||
@decorator
|
||||
x: A = new A();
|
||||
}
|
||||
|
||||
|
||||
//// [decoratorMetadataWithConstructorType.js]
|
||||
var A = (function () {
|
||||
function A() {
|
||||
console.log('new A');
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
function decorator(target, propertyKey) {
|
||||
}
|
||||
var B = (function () {
|
||||
function B() {
|
||||
this.x = new A();
|
||||
}
|
||||
__decorate([
|
||||
decorator,
|
||||
__metadata('design:type', A)
|
||||
], B.prototype, "x");
|
||||
return B;
|
||||
})();
|
||||
exports.B = B;
|
||||
@@ -0,0 +1,39 @@
|
||||
=== tests/cases/compiler/decoratorMetadataWithConstructorType.ts ===
|
||||
|
||||
declare var console: {
|
||||
>console : Symbol(console, Decl(decoratorMetadataWithConstructorType.ts, 1, 11))
|
||||
|
||||
log(msg: string): void;
|
||||
>log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22))
|
||||
>msg : Symbol(msg, Decl(decoratorMetadataWithConstructorType.ts, 2, 8))
|
||||
|
||||
};
|
||||
|
||||
class A {
|
||||
>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2))
|
||||
|
||||
constructor() { console.log('new A'); }
|
||||
>console.log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22))
|
||||
>console : Symbol(console, Decl(decoratorMetadataWithConstructorType.ts, 1, 11))
|
||||
>log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22))
|
||||
}
|
||||
|
||||
function decorator(target: Object, propertyKey: string) {
|
||||
>decorator : Symbol(decorator, Decl(decoratorMetadataWithConstructorType.ts, 7, 1))
|
||||
>target : Symbol(target, Decl(decoratorMetadataWithConstructorType.ts, 9, 19))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
|
||||
>propertyKey : Symbol(propertyKey, Decl(decoratorMetadataWithConstructorType.ts, 9, 34))
|
||||
}
|
||||
|
||||
export class B {
|
||||
>B : Symbol(B, Decl(decoratorMetadataWithConstructorType.ts, 10, 1))
|
||||
|
||||
@decorator
|
||||
>decorator : Symbol(decorator, Decl(decoratorMetadataWithConstructorType.ts, 7, 1))
|
||||
|
||||
x: A = new A();
|
||||
>x : Symbol(x, Decl(decoratorMetadataWithConstructorType.ts, 12, 16))
|
||||
>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2))
|
||||
>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
=== tests/cases/compiler/decoratorMetadataWithConstructorType.ts ===
|
||||
|
||||
declare var console: {
|
||||
>console : { log(msg: string): void; }
|
||||
|
||||
log(msg: string): void;
|
||||
>log : (msg: string) => void
|
||||
>msg : string
|
||||
|
||||
};
|
||||
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
constructor() { console.log('new A'); }
|
||||
>console.log('new A') : void
|
||||
>console.log : (msg: string) => void
|
||||
>console : { log(msg: string): void; }
|
||||
>log : (msg: string) => void
|
||||
>'new A' : string
|
||||
}
|
||||
|
||||
function decorator(target: Object, propertyKey: string) {
|
||||
>decorator : (target: Object, propertyKey: string) => void
|
||||
>target : Object
|
||||
>Object : Object
|
||||
>propertyKey : string
|
||||
}
|
||||
|
||||
export class B {
|
||||
>B : B
|
||||
|
||||
@decorator
|
||||
>decorator : (target: Object, propertyKey: string) => void
|
||||
|
||||
x: A = new A();
|
||||
>x : A
|
||||
>A : A
|
||||
>new A() : A
|
||||
>A : typeof A
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import {db} from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db;
|
||||
|
||||
constructor(db: db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
exports.db = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [db_1.db])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import {db} from './db';
|
||||
>db : Symbol(db, Decl(service.ts, 0, 8))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 24))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 24))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: db;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 8))
|
||||
|
||||
constructor(db: db) {
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 8))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(db.doSomething, Decl(db.ts, 0, 17))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(db.doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import {db} from './db';
|
||||
>db : typeof db
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: db;
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
constructor(db: db) {
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : db
|
||||
>this.db : db
|
||||
>this : MyClass
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : db
|
||||
>this : MyClass
|
||||
>db : db
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision2.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import {db as Database} from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: Database;
|
||||
|
||||
constructor(db: Database) { // no collision
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
exports.db = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [db_1.db])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import {db as Database} from './db';
|
||||
>db : Symbol(Database, Decl(service.ts, 0, 8))
|
||||
>Database : Symbol(Database, Decl(service.ts, 0, 8))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 36))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 36))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: Database;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>Database : Symbol(Database, Decl(service.ts, 0, 8))
|
||||
|
||||
constructor(db: Database) { // no collision
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>Database : Symbol(Database, Decl(service.ts, 0, 8))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(Database.doSomething, Decl(db.ts, 0, 17))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(Database.doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import {db as Database} from './db';
|
||||
>db : typeof Database
|
||||
>Database : typeof Database
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: Database;
|
||||
>db : Database
|
||||
>Database : Database
|
||||
|
||||
constructor(db: Database) { // no collision
|
||||
>db : Database
|
||||
>Database : Database
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : Database
|
||||
>this.db : Database
|
||||
>this : MyClass
|
||||
>db : Database
|
||||
>db : Database
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : Database
|
||||
>this : MyClass
|
||||
>db : Database
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision3.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import db = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db.db;
|
||||
|
||||
constructor(db: db.db) { // collision with namespace of external module db
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
exports.db = db;
|
||||
//// [service.js]
|
||||
var db = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [db.db])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import db = require('./db');
|
||||
>db : Symbol(db, Decl(service.ts, 0, 0))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 28))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 28))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: db.db;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 0))
|
||||
>db : Symbol(db.db, Decl(db.ts, 0, 0))
|
||||
|
||||
constructor(db: db.db) { // collision with namespace of external module db
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 0))
|
||||
>db : Symbol(db.db, Decl(db.ts, 0, 0))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(db.db.doSomething, Decl(db.ts, 0, 17))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(db.db.doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import db = require('./db');
|
||||
>db : typeof db
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: db.db;
|
||||
>db : db.db
|
||||
>db : any
|
||||
>db : db.db
|
||||
|
||||
constructor(db: db.db) { // collision with namespace of external module db
|
||||
>db : db.db
|
||||
>db : any
|
||||
>db : db.db
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : db.db
|
||||
>this.db : db.db
|
||||
>this : MyClass
|
||||
>db : db.db
|
||||
>db : db.db
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : db.db
|
||||
>this : MyClass
|
||||
>db : db.db
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
tests/cases/compiler/service.ts(1,8): error TS1192: Module '"tests/cases/compiler/db"' has no default export.
|
||||
|
||||
|
||||
==== tests/cases/compiler/db.ts (0 errors) ====
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/service.ts (1 errors) ====
|
||||
import db from './db'; // error no default export
|
||||
~~
|
||||
!!! error TS1192: Module '"tests/cases/compiler/db"' has no default export.
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db.db;
|
||||
|
||||
constructor(db: db.db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision4.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import db from './db'; // error no default export
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db.db;
|
||||
|
||||
constructor(db: db.db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
exports.db = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db'); // error no default export
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [Object])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
@@ -0,0 +1,52 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision5.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export default class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import db from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db;
|
||||
|
||||
constructor(db: db) { // collision
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [db_1.default])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export default class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 25))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import db from './db';
|
||||
>db : Symbol(db, Decl(service.ts, 0, 6))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 22))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 22))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: db;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 6))
|
||||
|
||||
constructor(db: db) { // collision
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>db : Symbol(db, Decl(service.ts, 0, 6))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(db.doSomething, Decl(db.ts, 0, 25))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(db.doSomething, Decl(db.ts, 0, 25))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export default class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import db from './db';
|
||||
>db : typeof db
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: db;
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
constructor(db: db) { // collision
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : db
|
||||
>this.db : db
|
||||
>this : MyClass
|
||||
>db : db
|
||||
>db : db
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : db
|
||||
>this : MyClass
|
||||
>db : db
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision6.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export default class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import database from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: database;
|
||||
|
||||
constructor(db: database) { // no collision
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [db_1.default])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export default class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 25))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import database from './db';
|
||||
>database : Symbol(database, Decl(service.ts, 0, 6))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 28))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 28))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: database;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>database : Symbol(database, Decl(service.ts, 0, 6))
|
||||
|
||||
constructor(db: database) { // no collision
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>database : Symbol(database, Decl(service.ts, 0, 6))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(database.doSomething, Decl(db.ts, 0, 25))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(database.doSomething, Decl(db.ts, 0, 25))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export default class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import database from './db';
|
||||
>database : typeof database
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: database;
|
||||
>db : database
|
||||
>database : database
|
||||
|
||||
constructor(db: database) { // no collision
|
||||
>db : database
|
||||
>database : database
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : database
|
||||
>this.db : database
|
||||
>this : MyClass
|
||||
>db : database
|
||||
>db : database
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : database
|
||||
>this : MyClass
|
||||
>db : database
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
tests/cases/compiler/service.ts(7,9): error TS2503: Cannot find namespace 'db'.
|
||||
tests/cases/compiler/service.ts(9,21): error TS2503: Cannot find namespace 'db'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/db.ts (0 errors) ====
|
||||
export default class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/service.ts (2 errors) ====
|
||||
import db from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db.db; //error
|
||||
~~
|
||||
!!! error TS2503: Cannot find namespace 'db'.
|
||||
|
||||
constructor(db: db.db) { // error
|
||||
~~
|
||||
!!! error TS2503: Cannot find namespace 'db'.
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export default class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import db from './db';
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: db.db; //error
|
||||
|
||||
constructor(db: db.db) { // error
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = db;
|
||||
//// [service.js]
|
||||
var db_1 = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [Object])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
@@ -0,0 +1,51 @@
|
||||
//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision8.ts] ////
|
||||
|
||||
//// [db.ts]
|
||||
export class db {
|
||||
public doSomething() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [service.ts]
|
||||
import database = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
@someDecorator
|
||||
class MyClass {
|
||||
db: database.db;
|
||||
|
||||
constructor(db: database.db) { // no collision
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
|
||||
|
||||
//// [db.js]
|
||||
var db = (function () {
|
||||
function db() {
|
||||
}
|
||||
db.prototype.doSomething = function () {
|
||||
};
|
||||
return db;
|
||||
})();
|
||||
exports.db = db;
|
||||
//// [service.js]
|
||||
var database = require('./db');
|
||||
function someDecorator(target) {
|
||||
return target;
|
||||
}
|
||||
var MyClass = (function () {
|
||||
function MyClass(db) {
|
||||
this.db = db;
|
||||
this.db.doSomething();
|
||||
}
|
||||
MyClass = __decorate([
|
||||
someDecorator,
|
||||
__metadata('design:paramtypes', [database.db])
|
||||
], MyClass);
|
||||
return MyClass;
|
||||
})();
|
||||
exports.MyClass = MyClass;
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import database = require('./db');
|
||||
>database : Symbol(database, Decl(service.ts, 0, 0))
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 34))
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
|
||||
return target;
|
||||
>target : Symbol(target, Decl(service.ts, 1, 23))
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : Symbol(someDecorator, Decl(service.ts, 0, 34))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
|
||||
db: database.db;
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>database : Symbol(database, Decl(service.ts, 0, 0))
|
||||
>db : Symbol(database.db, Decl(db.ts, 0, 0))
|
||||
|
||||
constructor(db: database.db) { // no collision
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
>database : Symbol(database, Decl(service.ts, 0, 0))
|
||||
>db : Symbol(database.db, Decl(db.ts, 0, 0))
|
||||
|
||||
this.db = db;
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>db : Symbol(db, Decl(service.ts, 8, 16))
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething : Symbol(database.db.doSomething, Decl(db.ts, 0, 17))
|
||||
>this.db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>this : Symbol(MyClass, Decl(service.ts, 3, 1))
|
||||
>db : Symbol(db, Decl(service.ts, 5, 15))
|
||||
>doSomething : Symbol(database.db.doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : Symbol(MyClass, Decl(service.ts, 13, 8))
|
||||
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : Symbol(db, Decl(db.ts, 0, 0))
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(db.ts, 0, 17))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
=== tests/cases/compiler/service.ts ===
|
||||
import database = require('./db');
|
||||
>database : typeof database
|
||||
|
||||
function someDecorator(target) {
|
||||
>someDecorator : (target: any) => any
|
||||
>target : any
|
||||
|
||||
return target;
|
||||
>target : any
|
||||
}
|
||||
@someDecorator
|
||||
>someDecorator : (target: any) => any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
db: database.db;
|
||||
>db : database.db
|
||||
>database : any
|
||||
>db : database.db
|
||||
|
||||
constructor(db: database.db) { // no collision
|
||||
>db : database.db
|
||||
>database : any
|
||||
>db : database.db
|
||||
|
||||
this.db = db;
|
||||
>this.db = db : database.db
|
||||
>this.db : database.db
|
||||
>this : MyClass
|
||||
>db : database.db
|
||||
>db : database.db
|
||||
|
||||
this.db.doSomething();
|
||||
>this.db.doSomething() : void
|
||||
>this.db.doSomething : () => void
|
||||
>this.db : database.db
|
||||
>this : MyClass
|
||||
>db : database.db
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
export {MyClass};
|
||||
>MyClass : typeof MyClass
|
||||
|
||||
=== tests/cases/compiler/db.ts ===
|
||||
export class db {
|
||||
>db : db
|
||||
|
||||
public doSomething() {
|
||||
>doSomething : () => void
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
|
||||
type arrayString = Array<String>
|
||||
>arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
type someArray = Array<String> | number[];
|
||||
>someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
type stringOrNumArray = Array<String|Number>;
|
||||
>stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
function a1(...x: (number|string)[]) { }
|
||||
@@ -33,8 +33,8 @@ function a2(...a) { }
|
||||
function a3(...a: Array<String>) { }
|
||||
>a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21))
|
||||
>a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36))
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
|
||||
type arrayString = Array<String>
|
||||
>arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
type someArray = Array<String> | number[];
|
||||
>someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
type stringOrNumArray = Array<String|Number>;
|
||||
>stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
||||
|
||||
function a1(...x: (number|string)[]) { }
|
||||
@@ -33,8 +33,8 @@ function a2(...a) { }
|
||||
function a3(...a: Array<String>) { }
|
||||
>a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21))
|
||||
>a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4091, 1))
|
||||
>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4209, 1))
|
||||
|
||||
function a4(...a: arrayString) { }
|
||||
>a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36))
|
||||
|
||||
@@ -5,7 +5,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
let arguments = 100;
|
||||
|
||||
@@ -8,7 +8,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
const arguments = 100;
|
||||
|
||||
@@ -8,7 +8,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
|
||||
@@ -9,7 +9,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
|
||||
@@ -10,7 +10,7 @@ function f() {
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4392, 60))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [emitBOM.js.map]
|
||||
{"version":3,"file":"emitBOM.js","sourceRoot":"","sources":["emitBOM.ts"],"names":[],"mappings":"AAEA,AADA,6DAA6D;IACzD,CAAC,CAAC"}
|
||||
{"version":3,"file":"emitBOM.js","sourceRoot":"","sources":["emitBOM.ts"],"names":[],"mappings":"AACA,6DAA6D;AAC7D,IAAI,CAAC,CAAC"}
|
||||
@@ -10,28 +10,27 @@ sourceFile:emitBOM.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>// JS and d.ts output should have a BOM but not the sourcemap
|
||||
1 >
|
||||
2 >
|
||||
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1 >
|
||||
>// JS and d.ts output should have a BOM but not the sourcemap
|
||||
>
|
||||
2 >
|
||||
3 >// JS and d.ts output should have a BOM but not the sourcemap
|
||||
1 >Emitted(1, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
3 >Emitted(1, 62) Source(2, 62) + SourceIndex(0)
|
||||
2 >// JS and d.ts output should have a BOM but not the sourcemap
|
||||
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 62) Source(2, 62) + SourceIndex(0)
|
||||
---
|
||||
>>>var x;
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var
|
||||
2 > x
|
||||
3 > ;
|
||||
1 >Emitted(2, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(2, 7) Source(3, 7) + SourceIndex(0)
|
||||
>
|
||||
2 >var
|
||||
3 > x
|
||||
4 > ;
|
||||
1 >Emitted(2, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 5) Source(3, 5) + SourceIndex(0)
|
||||
3 >Emitted(2, 6) Source(3, 6) + SourceIndex(0)
|
||||
4 >Emitted(2, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=emitBOM.js.map
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/compiler/es6ImportEqualsDeclaration2.ts] ////
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
declare module "other" {
|
||||
export class C { }
|
||||
}
|
||||
|
||||
declare module "server" {
|
||||
import events = require("other"); // Ambient declaration, no error expected.
|
||||
|
||||
module S {
|
||||
export var a: number;
|
||||
}
|
||||
|
||||
export = S; // Ambient declaration, no error expected.
|
||||
}
|
||||
|
||||
//// [client.ts]
|
||||
import {a} from "server";
|
||||
|
||||
|
||||
//// [client.js]
|
||||
@@ -0,0 +1,26 @@
|
||||
=== tests/cases/compiler/server.d.ts ===
|
||||
|
||||
declare module "other" {
|
||||
export class C { }
|
||||
>C : Symbol(C, Decl(server.d.ts, 1, 24))
|
||||
}
|
||||
|
||||
declare module "server" {
|
||||
import events = require("other"); // Ambient declaration, no error expected.
|
||||
>events : Symbol(events, Decl(server.d.ts, 5, 25))
|
||||
|
||||
module S {
|
||||
>S : Symbol(S, Decl(server.d.ts, 6, 37))
|
||||
|
||||
export var a: number;
|
||||
>a : Symbol(a, Decl(server.d.ts, 9, 18))
|
||||
}
|
||||
|
||||
export = S; // Ambient declaration, no error expected.
|
||||
>S : Symbol(S, Decl(server.d.ts, 6, 37))
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/client.ts ===
|
||||
import {a} from "server";
|
||||
>a : Symbol(a, Decl(client.ts, 0, 8))
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
=== tests/cases/compiler/server.d.ts ===
|
||||
|
||||
declare module "other" {
|
||||
export class C { }
|
||||
>C : C
|
||||
}
|
||||
|
||||
declare module "server" {
|
||||
import events = require("other"); // Ambient declaration, no error expected.
|
||||
>events : typeof events
|
||||
|
||||
module S {
|
||||
>S : typeof S
|
||||
|
||||
export var a: number;
|
||||
>a : number
|
||||
}
|
||||
|
||||
export = S; // Ambient declaration, no error expected.
|
||||
>S : typeof S
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/client.ts ===
|
||||
import {a} from "server";
|
||||
>a : number
|
||||
|
||||
@@ -4,6 +4,6 @@ var v: string;
|
||||
|
||||
for (v of [""].values()) { }
|
||||
>v : Symbol(v, Decl(for-of13.ts, 0, 3))
|
||||
>[""].values : Symbol(Array.values, Decl(lib.d.ts, 1466, 37))
|
||||
>values : Symbol(Array.values, Decl(lib.d.ts, 1466, 37))
|
||||
>[""].values : Symbol(Array.values, Decl(lib.d.ts, 4119, 37))
|
||||
>values : Symbol(Array.values, Decl(lib.d.ts, 4119, 37))
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ class StringIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(StringIterator, Decl(for-of18.ts, 1, 33))
|
||||
|
||||
@@ -27,9 +27,9 @@ class FooIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(FooIterator, Decl(for-of19.ts, 4, 13))
|
||||
|
||||
@@ -27,9 +27,9 @@ class FooIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(FooIterator, Decl(for-of20.ts, 4, 13))
|
||||
|
||||
@@ -27,9 +27,9 @@ class FooIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(FooIterator, Decl(for-of21.ts, 4, 13))
|
||||
|
||||
@@ -28,9 +28,9 @@ class FooIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(FooIterator, Decl(for-of22.ts, 5, 13))
|
||||
|
||||
@@ -27,9 +27,9 @@ class FooIterator {
|
||||
};
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(FooIterator, Decl(for-of23.ts, 4, 13))
|
||||
|
||||
@@ -10,9 +10,9 @@ class StringIterator {
|
||||
>StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 1, 37))
|
||||
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return x;
|
||||
>x : Symbol(x, Decl(for-of25.ts, 0, 3))
|
||||
|
||||
@@ -16,9 +16,9 @@ class StringIterator {
|
||||
>x : Symbol(x, Decl(for-of26.ts, 0, 3))
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(StringIterator, Decl(for-of26.ts, 1, 37))
|
||||
|
||||
@@ -7,7 +7,7 @@ class StringIterator {
|
||||
>StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 37))
|
||||
|
||||
[Symbol.iterator]: any;
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ class StringIterator {
|
||||
>next : Symbol(next, Decl(for-of28.ts, 2, 22))
|
||||
|
||||
[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
return this;
|
||||
>this : Symbol(StringIterator, Decl(for-of28.ts, 0, 37))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of37.ts ===
|
||||
var map = new Map([["", true]]);
|
||||
>map : Symbol(map, Decl(for-of37.ts, 0, 3))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1900, 11))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 4608, 1), Decl(lib.d.ts, 4631, 11))
|
||||
|
||||
for (var v of map) {
|
||||
>v : Symbol(v, Decl(for-of37.ts, 1, 8))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of38.ts ===
|
||||
var map = new Map([["", true]]);
|
||||
>map : Symbol(map, Decl(for-of38.ts, 0, 3))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1900, 11))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 4608, 1), Decl(lib.d.ts, 4631, 11))
|
||||
|
||||
for (var [k, v] of map) {
|
||||
>k : Symbol(k, Decl(for-of38.ts, 1, 10))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of40.ts ===
|
||||
var map = new Map([["", true]]);
|
||||
>map : Symbol(map, Decl(for-of40.ts, 0, 3))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1900, 11))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 4608, 1), Decl(lib.d.ts, 4631, 11))
|
||||
|
||||
for (var [k = "", v = false] of map) {
|
||||
>k : Symbol(k, Decl(for-of40.ts, 1, 10))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of44.ts ===
|
||||
var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]]
|
||||
>array : Symbol(array, Decl(for-of44.ts, 0, 3))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
|
||||
for (var [num, strBoolSym] of array) {
|
||||
>num : Symbol(num, Decl(for-of44.ts, 1, 10))
|
||||
|
||||
@@ -5,7 +5,7 @@ var k: string, v: boolean;
|
||||
|
||||
var map = new Map([["", true]]);
|
||||
>map : Symbol(map, Decl(for-of45.ts, 1, 3))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1900, 11))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 4608, 1), Decl(lib.d.ts, 4631, 11))
|
||||
|
||||
for ([k = "", v = false] of map) {
|
||||
>k : Symbol(k, Decl(for-of45.ts, 0, 3))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of50.ts ===
|
||||
var map = new Map([["", true]]);
|
||||
>map : Symbol(map, Decl(for-of50.ts, 0, 3))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1900, 11))
|
||||
>Map : Symbol(Map, Decl(lib.d.ts, 4608, 1), Decl(lib.d.ts, 4631, 11))
|
||||
|
||||
for (const [k, v] of map) {
|
||||
>k : Symbol(k, Decl(for-of50.ts, 1, 12))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/for-ofStatements/for-of57.ts ===
|
||||
var iter: Iterable<number>;
|
||||
>iter : Symbol(iter, Decl(for-of57.ts, 0, 3))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
|
||||
for (let num of iter) { }
|
||||
>num : Symbol(num, Decl(for-of57.ts, 1, 8))
|
||||
|
||||
@@ -3,9 +3,9 @@ class C {
|
||||
>C : Symbol(C, Decl(generatorES6_6.ts, 0, 0))
|
||||
|
||||
*[Symbol.iterator]() {
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31))
|
||||
|
||||
let a = yield 1;
|
||||
>a : Symbol(a, Decl(generatorES6_6.ts, 2, 7))
|
||||
|
||||
@@ -5,15 +5,15 @@ class C {
|
||||
f(s: string): Iterable<any>;
|
||||
>f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32))
|
||||
>s : Symbol(s, Decl(generatorOverloads4.ts, 1, 6))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
|
||||
f(s: number): Iterable<any>;
|
||||
>f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32))
|
||||
>s : Symbol(s, Decl(generatorOverloads4.ts, 2, 6))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
|
||||
*f(s: any): Iterable<any> { }
|
||||
>f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32))
|
||||
>s : Symbol(s, Decl(generatorOverloads4.ts, 3, 7))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ module M {
|
||||
function f(s: string): Iterable<any>;
|
||||
>f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41))
|
||||
>s : Symbol(s, Decl(generatorOverloads5.ts, 1, 15))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
|
||||
function f(s: number): Iterable<any>;
|
||||
>f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41))
|
||||
>s : Symbol(s, Decl(generatorOverloads5.ts, 2, 15))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
|
||||
function* f(s: any): Iterable<any> { }
|
||||
>f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41))
|
||||
>s : Symbol(s, Decl(generatorOverloads5.ts, 3, 16))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.d.ts, 4369, 1))
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts ===
|
||||
function* g1(): Iterator<string> { }
|
||||
>g1 : Symbol(g1, Decl(generatorTypeCheck1.ts, 0, 0))
|
||||
>Iterator : Symbol(Iterator, Decl(lib.d.ts, 1675, 1))
|
||||
>Iterator : Symbol(Iterator, Decl(lib.d.ts, 4363, 1))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts ===
|
||||
function* g(): IterableIterator<any> {
|
||||
>g : Symbol(g, Decl(generatorTypeCheck10.ts, 0, 0))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4373, 1))
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts ===
|
||||
function* g(): IterableIterator<number> {
|
||||
>g : Symbol(g, Decl(generatorTypeCheck11.ts, 0, 0))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4373, 1))
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts ===
|
||||
function* g(): IterableIterator<number> {
|
||||
>g : Symbol(g, Decl(generatorTypeCheck12.ts, 0, 0))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4373, 1))
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts ===
|
||||
function* g(): IterableIterator<number> {
|
||||
>g : Symbol(g, Decl(generatorTypeCheck13.ts, 0, 0))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4373, 1))
|
||||
|
||||
yield 0;
|
||||
return "";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user