{"ScriptPreparationCode":" function getPropertyDescriptor(obj, property) {\r\n const descriptor = Object.getOwnPropertyDescriptor(obj, property);\r\n if (descriptor !== undefined)\r\n return descriptor;\r\n const proto = Object.getPrototypeOf(obj);\r\n if (proto === null)\r\n return undefined;\r\n return getPropertyDescriptor(proto, property);\r\n }\r\n\r\n function getPropertyOrDefault(obj, property, defaultValue) {\r\n const d = getPropertyDescriptor(obj, property);\r\n if (d) {\r\n if (Object.prototype.hasOwnProperty.call(d, \u0022value\u0022))\r\n return d.value;\r\n if (Object.prototype.hasOwnProperty.call(d, \u0022get\u0022))\r\n return d.get.call(obj);\r\n }\r\n return defaultValue;\r\n }\r\n\r\n function getPropertyOrDefault2(obj, property, defaultValue) {\r\n if (Reflect.has(obj, property)) return obj[property];\r\n return defaultValue;\r\n }\r\n\r\n class T {\r\n constructor() {\r\n this.requiredField = 1;\r\n this.undefinableField = undefined;\r\n this.m_requiredProp = 1;\r\n this.m_undefinableProp = undefined;\r\n }\r\n get requiredProp() {\r\n return this.m_requiredProp;\r\n }\r\n set requiredProp(value) {\r\n this.m_requiredProp = value;\r\n }\r\n get undefinableProp() {\r\n return this.m_undefinableProp;\r\n }\r\n set undefinableProp(value) {\r\n this.m_undefinableProp = value;\r\n }\r\n }\r\n var t = new T();\r\n t.requiredField = 1;\r\n t.requiredProp = 1;\r\n\r\n class D extends T {}\r\n var d = new D();\r\nd.requiredField = 1;\r\n d.requiredProp = 1;","TestCases":[{"Name":"requiredProp","Code":"const v = t.requiredProp;","IsDeferred":false},{"Name":"requiredProp_getPropertyOrDefault","Code":"const v = getPropertyOrDefault(t, \u0022requiredProp\u0022, 0);","IsDeferred":false},{"Name":"derived_requiredProp","Code":"const v = d.requiredProp","IsDeferred":false},{"Name":"derived_requiredProp_getPropertyOrDefault","Code":"const v = getPropertyOrDefault(d, \u0022requiredProp\u0022, 0);","IsDeferred":false},{"Name":"requiredField","Code":"const v = t.requiredField","IsDeferred":false},{"Name":"requiredField_getPropertyOrDefault","Code":"const v = getPropertyOrDefault(t, \u0022requiredField\u0022, 0);","IsDeferred":false},{"Name":"derived_requiredField","Code":"const v = d.requiredField","IsDeferred":false},{"Name":"derived_requiredField_getPropertyOrDefault","Code":"const v = getPropertyOrDefault(d, \u0022requiredField\u0022, 0);","IsDeferred":false},{"Name":"derived_prop_reflectHas","Code":"const v = getPropertyOrDefault2(d, \u0022requiredField\u0022, 0);","IsDeferred":false}]}