64 lines
835 B
Text
64 lines
835 B
Text
=== tests/cases/conformance/classes/classDeclarations/classBody/classWithEmptyBody.ts ===
|
|
class C {
|
|
>C : C
|
|
}
|
|
|
|
var c: C;
|
|
>c : C
|
|
>C : C
|
|
|
|
var o: {} = c;
|
|
>o : {}
|
|
>c : C
|
|
|
|
c = 1;
|
|
>c = 1 : number
|
|
>c : C
|
|
>1 : number
|
|
|
|
c = { foo: '' }
|
|
>c = { foo: '' } : { foo: string; }
|
|
>c : C
|
|
>{ foo: '' } : { foo: string; }
|
|
>foo : string
|
|
>'' : string
|
|
|
|
c = () => { }
|
|
>c = () => { } : () => void
|
|
>c : C
|
|
>() => { } : () => void
|
|
|
|
class D {
|
|
>D : D
|
|
|
|
constructor() {
|
|
return 1;
|
|
>1 : number
|
|
}
|
|
}
|
|
|
|
var d: D;
|
|
>d : D
|
|
>D : D
|
|
|
|
var o: {} = d;
|
|
>o : {}
|
|
>d : D
|
|
|
|
d = 1;
|
|
>d = 1 : number
|
|
>d : D
|
|
>1 : number
|
|
|
|
d = { foo: '' }
|
|
>d = { foo: '' } : { foo: string; }
|
|
>d : D
|
|
>{ foo: '' } : { foo: string; }
|
|
>foo : string
|
|
>'' : string
|
|
|
|
d = () => { }
|
|
>d = () => { } : () => void
|
|
>d : D
|
|
>() => { } : () => void
|
|
|