dcaefe732e
* Accept generics for defineProperty Both `Object.defineProperty()` and `Object.defineProperties()` return their first argument. Use a generic so that typings can be passed through. * Update baselines * update missed baseline Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
27 lines
760 B
Plaintext
27 lines
760 B
Plaintext
=== /a.js ===
|
|
function Graphic() {
|
|
>Graphic : typeof Graphic
|
|
}
|
|
|
|
Object.defineProperty(Graphic.prototype, "instance", {
|
|
>Object.defineProperty(Graphic.prototype, "instance", { get: function() { return this; }}) : any
|
|
>Object.defineProperty : <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T
|
|
>Object : ObjectConstructor
|
|
>defineProperty : <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T
|
|
>Graphic.prototype : any
|
|
>Graphic : typeof Graphic
|
|
>prototype : any
|
|
>"instance" : "instance"
|
|
>{ get: function() { return this; }} : { get: () => this; }
|
|
|
|
get: function() {
|
|
>get : () => this
|
|
>function() { return this; } : () => this
|
|
|
|
return this;
|
|
>this : this
|
|
}
|
|
});
|
|
|
|
|