23 lines
452 B
JavaScript
23 lines
452 B
JavaScript
|
//// [getterSetterNonAccessor.ts]
|
||
|
function getFunc():any{return 0;}
|
||
|
function setFunc(v){}
|
||
|
|
||
|
Object.defineProperty({}, "0", <PropertyDescriptor>({
|
||
|
get: getFunc,
|
||
|
set: setFunc,
|
||
|
configurable: true
|
||
|
}));
|
||
|
|
||
|
|
||
|
//// [getterSetterNonAccessor.js]
|
||
|
function getFunc() {
|
||
|
return 0;
|
||
|
}
|
||
|
function setFunc(v) {
|
||
|
}
|
||
|
Object.defineProperty({}, "0", ({
|
||
|
get: getFunc,
|
||
|
set: setFunc,
|
||
|
configurable: true
|
||
|
}));
|