TypeScript/tests/baselines/reference/accessorBodyInTypeContext.js
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

21 lines
244 B
TypeScript

//// [accessorBodyInTypeContext.ts]
type A = {
get foo() { return 0 }
};
type B = {
set foo(v: any) { }
};
interface X {
get foo() { return 0 }
}
interface Y {
set foo(v: any) { }
}
//// [accessorBodyInTypeContext.js]