mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
523 B
TypeScript
23 lines
523 B
TypeScript
//// [tests/cases/compiler/getterSetterNonAccessor.ts] ////
|
|
|
|
//// [getterSetterNonAccessor.ts]
|
|
function getFunc():any{return 0;}
|
|
function setFunc(v){}
|
|
|
|
Object.defineProperty({}, "0", <PropertyDescriptor>({
|
|
get: getFunc,
|
|
set: setFunc,
|
|
configurable: true
|
|
}));
|
|
|
|
|
|
//// [getterSetterNonAccessor.js]
|
|
"use strict";
|
|
function getFunc() { return 0; }
|
|
function setFunc(v) { }
|
|
Object.defineProperty({}, "0", ({
|
|
get: getFunc,
|
|
set: setFunc,
|
|
configurable: true
|
|
}));
|