TypeScript/tests/baselines/reference/propertyNameWithoutTypeAnnotation.types
2015-04-15 16:44:20 -07:00

62 lines
818 B
Plaintext

=== tests/cases/conformance/types/objectTypeLiteral/propertySignatures/propertyNameWithoutTypeAnnotation.ts ===
class C {
>C : C
foo;
>foo : any
}
interface I {
>I : I
foo;
>foo : any
}
var a: {
>a : { foo: any; }
foo;
>foo : any
}
var b = {
>b : { foo: any; }
>{ foo: null} : { foo: null; }
foo: null
>foo : null
>null : null
}
// These should all be of type 'any'
var r1 = (new C()).foo;
>r1 : any
>(new C()).foo : any
>(new C()) : C
>new C() : C
>C : typeof C
>foo : any
var r2 = (<I>null).foo;
>r2 : any
>(<I>null).foo : any
>(<I>null) : I
><I>null : I
>I : I
>null : null
>foo : any
var r3 = a.foo;
>r3 : any
>a.foo : any
>a : { foo: any; }
>foo : any
var r4 = b.foo;
>r4 : any
>b.foo : any
>b : { foo: any; }
>foo : any