1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
=== tests/cases/compiler/typePredicatesInUnion_noMatch.ts ===
interface A {
>A : Symbol(A, Decl(typePredicatesInUnion_noMatch.ts, 0, 0))
pred(x: {}, y: {}): x is boolean;
>pred : Symbol(A.pred, Decl(typePredicatesInUnion_noMatch.ts, 0, 13))
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 1, 9))
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 1, 15))
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 1, 9))
}
interface B {
>B : Symbol(B, Decl(typePredicatesInUnion_noMatch.ts, 2, 1))
pred(x: {}, y: {}): y is string;
>pred : Symbol(B.pred, Decl(typePredicatesInUnion_noMatch.ts, 3, 13))
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 4, 9))
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 4, 15))
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 4, 15))
}
type Or = A | B;
>Or : Symbol(Or, Decl(typePredicatesInUnion_noMatch.ts, 5, 1))
>A : Symbol(A, Decl(typePredicatesInUnion_noMatch.ts, 0, 0))
>B : Symbol(B, Decl(typePredicatesInUnion_noMatch.ts, 2, 1))
function f(o: Or, x: {}, y: {}) {
>f : Symbol(f, Decl(typePredicatesInUnion_noMatch.ts, 7, 16))
>o : Symbol(o, Decl(typePredicatesInUnion_noMatch.ts, 9, 11))
>Or : Symbol(Or, Decl(typePredicatesInUnion_noMatch.ts, 5, 1))
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 9, 17))
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 9, 24))
if (o.pred(x, y)) {
>o.pred : Symbol(pred, Decl(typePredicatesInUnion_noMatch.ts, 0, 13), Decl(typePredicatesInUnion_noMatch.ts, 3, 13))
>o : Symbol(o, Decl(typePredicatesInUnion_noMatch.ts, 9, 11))
>pred : Symbol(pred, Decl(typePredicatesInUnion_noMatch.ts, 0, 13), Decl(typePredicatesInUnion_noMatch.ts, 3, 13))
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 9, 17))
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 9, 24))
x;
>x : Symbol(x, Decl(typePredicatesInUnion_noMatch.ts, 9, 17))
y;
>y : Symbol(y, Decl(typePredicatesInUnion_noMatch.ts, 9, 24))
}
}
|