Accept baselines

This commit is contained in:
Tingan Ho 2015-06-24 10:48:22 +08:00
parent 2aceeea064
commit 485e319057
4 changed files with 24 additions and 0 deletions

View File

@ -25,16 +25,19 @@ class C extends A {
declare function isA(p1: any): p1 is A;
>isA : Symbol(isA, Decl(typeGuardFunction.ts, 11, 1))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 13, 21))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 13, 21))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
declare function isB(p1: any): p1 is B;
>isB : Symbol(isB, Decl(typeGuardFunction.ts, 13, 39))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 14, 21))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 14, 21))
>B : Symbol(B, Decl(typeGuardFunction.ts, 3, 1))
declare function isC(p1: any): p1 is C;
>isC : Symbol(isC, Decl(typeGuardFunction.ts, 14, 39))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 15, 21))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 15, 21))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
declare function retC(): C;
@ -98,6 +101,7 @@ interface I1 {
(p1: A): p1 is C;
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 41, 5))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 41, 5))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
}
@ -107,6 +111,7 @@ declare function isC_multipleParams(p1, p2): p1 is C;
>isC_multipleParams : Symbol(isC_multipleParams, Decl(typeGuardFunction.ts, 42, 1))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 46, 36))
>p2 : Symbol(p2, Decl(typeGuardFunction.ts, 46, 39))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 46, 36))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
if (isC_multipleParams(a, 0)) {
@ -127,6 +132,7 @@ var obj: {
>func1 : Symbol(func1, Decl(typeGuardFunction.ts, 52, 10))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 53, 10))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 53, 10))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
}
class D {
@ -136,6 +142,7 @@ class D {
>method1 : Symbol(method1, Decl(typeGuardFunction.ts, 55, 9))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 56, 12))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 56, 12))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
return true;
@ -147,6 +154,7 @@ let f1 = (p1: A): p1 is C => false;
>f1 : Symbol(f1, Decl(typeGuardFunction.ts, 62, 3))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 62, 10))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 62, 10))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
// Function type
@ -155,6 +163,7 @@ declare function f2(p1: (p1: A) => p1 is C);
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 65, 20))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 65, 25))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 65, 25))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
// Function expressions
@ -162,6 +171,7 @@ f2(function(p1: A): p1 is C {
>f2 : Symbol(f2, Decl(typeGuardFunction.ts, 62, 35))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 68, 12))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 68, 12))
>C : Symbol(C, Decl(typeGuardFunction.ts, 7, 1))
return true;
@ -182,6 +192,7 @@ declare function acceptingTypeGuardFunction(p1: (item) => item is A);
>acceptingTypeGuardFunction : Symbol(acceptingTypeGuardFunction, Decl(typeGuardFunction.ts, 74, 25))
>p1 : Symbol(p1, Decl(typeGuardFunction.ts, 77, 44))
>item : Symbol(item, Decl(typeGuardFunction.ts, 77, 49))
>item : Symbol(item, Decl(typeGuardFunction.ts, 77, 49))
>A : Symbol(A, Decl(typeGuardFunction.ts, 0, 0))
acceptingTypeGuardFunction(isA);

View File

@ -25,11 +25,13 @@ class C extends A {
declare function isB(p1): p1 is B;
>isB : Symbol(isB, Decl(typeGuardFunctionGenerics.ts, 11, 1))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 13, 21))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 13, 21))
>B : Symbol(B, Decl(typeGuardFunctionGenerics.ts, 3, 1))
declare function isC(p1): p1 is C;
>isC : Symbol(isC, Decl(typeGuardFunctionGenerics.ts, 13, 34))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 14, 21))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 14, 21))
>C : Symbol(C, Decl(typeGuardFunctionGenerics.ts, 7, 1))
declare function retC(x): C;
@ -52,6 +54,7 @@ declare function funB<T>(p1: (p1) => T, p2: any): p2 is T;
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 18, 30))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 18, 22))
>p2 : Symbol(p2, Decl(typeGuardFunctionGenerics.ts, 18, 39))
>p2 : Symbol(p2, Decl(typeGuardFunctionGenerics.ts, 18, 39))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 18, 22))
declare function funC<T>(p1: (p1) => p1 is T): T;
@ -59,6 +62,7 @@ declare function funC<T>(p1: (p1) => p1 is T): T;
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 19, 22))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 19, 25))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 19, 30))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 19, 30))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 19, 22))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 19, 22))
@ -67,8 +71,10 @@ declare function funD<T>(p1: (p1) => p1 is T, p2: any): p2 is T;
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 20, 22))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 20, 25))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 20, 30))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 20, 30))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 20, 22))
>p2 : Symbol(p2, Decl(typeGuardFunctionGenerics.ts, 20, 45))
>p2 : Symbol(p2, Decl(typeGuardFunctionGenerics.ts, 20, 45))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 20, 22))
declare function funE<T, U>(p1: (p1) => p1 is T, p2: U): T;
@ -77,6 +83,7 @@ declare function funE<T, U>(p1: (p1) => p1 is T, p2: U): T;
>U : Symbol(U, Decl(typeGuardFunctionGenerics.ts, 21, 24))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 21, 28))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 21, 33))
>p1 : Symbol(p1, Decl(typeGuardFunctionGenerics.ts, 21, 33))
>T : Symbol(T, Decl(typeGuardFunctionGenerics.ts, 21, 22))
>p2 : Symbol(p2, Decl(typeGuardFunctionGenerics.ts, 21, 48))
>U : Symbol(U, Decl(typeGuardFunctionGenerics.ts, 21, 24))

View File

@ -31,6 +31,7 @@ var strOrNum: string | number;
function isC1(x: any): x is C1 {
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 14, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 14, 14))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
return true;
@ -39,6 +40,7 @@ function isC1(x: any): x is C1 {
function isC2(x: any): x is C2 {
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
return true;
@ -47,6 +49,7 @@ function isC2(x: any): x is C2 {
function isD1(x: any): x is D1 {
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
return true;

View File

@ -50,6 +50,7 @@ var strOrNum: string | number;
function isC1(x: any): x is C1 {
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 17, 30))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 20, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 20, 14))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 0, 0))
return true;
@ -58,6 +59,7 @@ function isC1(x: any): x is C1 {
function isC2(x: any): x is C2 {
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 22, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 24, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 24, 14))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 5, 1))
return true;
@ -66,6 +68,7 @@ function isC2(x: any): x is C2 {
function isD1(x: any): x is D1 {
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 26, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 28, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 28, 14))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsTypeOnInterfaces.ts, 10, 1))
return true;