TypeScript/tests/cases/compiler/javascriptDefinePropertyPrototypeNonConstructor.ts
Andrew Branch 91196fc53f
Ensure functions that have prototype properties assigned by Object.defineProperty get marked as classes (#34577)
* Ensure functions that have prototype properties assigned by Object.defineProperty get marked as classes

* Revert unneeded change
2019-10-18 16:31:43 -07:00

15 lines
200 B
TypeScript

// @allowJs: true
// @checkJs: false
// @noEmit: true
// @Filename: /a.js
function Graphic() {
}
Object.defineProperty(Graphic.prototype, "instance", {
get: function() {
return this;
}
});