mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 07:30:02 -04:00
fuck my tree-sitter life
This commit is contained in:
parent
9c3dd5052b
commit
6d498950e3
1 changed files with 6 additions and 6 deletions
|
@ -143,7 +143,7 @@ export class ScramjetClient {
|
||||||
const h: ProxyHandler<any> = {};
|
const h: ProxyHandler<any> = {};
|
||||||
|
|
||||||
if (handler.construct) {
|
if (handler.construct) {
|
||||||
h.construct = function
|
h.construct = function (
|
||||||
constructor: any,
|
constructor: any,
|
||||||
argArray: any[],
|
argArray: any[],
|
||||||
newTarget: AnyFunction
|
newTarget: AnyFunction
|
||||||
|
@ -171,7 +171,7 @@ export class ScramjetClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handler.apply) {
|
if (handler.apply) {
|
||||||
h.apply = functionfn: any, thisArg: any, argArray: any[]) {
|
h.apply = function (fn: any, thisArg: any, argArray: any[]) {
|
||||||
let returnValue: any = null;
|
let returnValue: any = null;
|
||||||
|
|
||||||
const ctx: ProxyCtx = {
|
const ctx: ProxyCtx = {
|
||||||
|
@ -228,10 +228,10 @@ export class ScramjetClient {
|
||||||
|
|
||||||
const ctx: TrapCtx<T> = {
|
const ctx: TrapCtx<T> = {
|
||||||
this: null,
|
this: null,
|
||||||
get: function) {
|
get: function () {
|
||||||
return oldDescriptor && oldDescriptor.get.call(this.this);
|
return oldDescriptor && oldDescriptor.get.call(this.this);
|
||||||
},
|
},
|
||||||
set: functionv: T) {
|
set: function (v: T) {
|
||||||
oldDescriptor && oldDescriptor.set.call(this.this, v);
|
oldDescriptor && oldDescriptor.set.call(this.this, v);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -241,7 +241,7 @@ export class ScramjetClient {
|
||||||
const desc: PropertyDescriptor = {};
|
const desc: PropertyDescriptor = {};
|
||||||
|
|
||||||
if (descriptor.get) {
|
if (descriptor.get) {
|
||||||
desc.get = function) {
|
desc.get = function () {
|
||||||
ctx.this = this;
|
ctx.this = this;
|
||||||
|
|
||||||
return descriptor.get(ctx);
|
return descriptor.get(ctx);
|
||||||
|
@ -251,7 +251,7 @@ export class ScramjetClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (descriptor.set) {
|
if (descriptor.set) {
|
||||||
desc.set = functionv: T) {
|
desc.set = function (v: T) {
|
||||||
ctx.this = this;
|
ctx.this = this;
|
||||||
|
|
||||||
descriptor.set(ctx, v);
|
descriptor.set(ctx, v);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue