TypeScript/tests/baselines/reference/accessorBodyInTypeContext.types
Ryan Cavanaugh ff233a9ac2
Variant accessors (#42425)
Allows accessors to have different access modifiers and types

Fixes #2845, #2521
2021-03-26 20:11:02 -07:00

33 lines
357 B
Plaintext

=== tests/cases/compiler/accessorBodyInTypeContext.ts ===
type A = {
>A : A
get foo() { return 0 }
>foo : number
>0 : 0
};
type B = {
>B : B
set foo(v: any) { }
>foo : any
>v : any
};
interface X {
get foo() { return 0 }
>foo : number
>0 : 0
}
interface Y {
set foo(v: any) { }
>foo : any
>v : any
}