TypeScript/tests/baselines/reference/structural1.types

31 lines
888 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/structural1.ts ===
module M {
2015-04-13 23:01:57 +02:00
>M : typeof M, Symbol(M, Decl(structural1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
export interface I {
2015-04-13 23:01:57 +02:00
>I : I, Symbol(I, Decl(structural1.ts, 0, 10))
2014-08-15 23:33:16 +02:00
salt:number;
2015-04-13 23:01:57 +02:00
>salt : number, Symbol(salt, Decl(structural1.ts, 1, 24))
2014-08-15 23:33:16 +02:00
pepper:number;
2015-04-13 23:01:57 +02:00
>pepper : number, Symbol(pepper, Decl(structural1.ts, 2, 20))
2014-08-15 23:33:16 +02:00
}
export function f(i:I) {
2015-04-13 23:01:57 +02:00
>f : (i: I) => void, Symbol(f, Decl(structural1.ts, 4, 5))
>i : I, Symbol(i, Decl(structural1.ts, 6, 22))
>I : I, Symbol(I, Decl(structural1.ts, 0, 10))
2014-08-15 23:33:16 +02:00
}
f({salt:2,pepper:0});
>f({salt:2,pepper:0}) : void
2015-04-13 23:01:57 +02:00
>f : (i: I) => void, Symbol(f, Decl(structural1.ts, 4, 5))
2014-08-15 23:33:16 +02:00
>{salt:2,pepper:0} : { salt: number; pepper: number; }
2015-04-13 23:01:57 +02:00
>salt : number, Symbol(salt, Decl(structural1.ts, 9, 7))
2015-04-13 21:36:11 +02:00
>2 : number
2015-04-13 23:01:57 +02:00
>pepper : number, Symbol(pepper, Decl(structural1.ts, 9, 14))
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
}