ff233a9ac2
Allows accessors to have different access modifiers and types Fixes #2845, #2521
33 lines
357 B
Plaintext
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
|
|
}
|
|
|
|
|