Running Prettier on most files
This commit is contained in:
@ -1,37 +1,39 @@
|
||||
import { type Editor } from '../main';
|
||||
import { type Editor } from "../main";
|
||||
import { Event } from "./AbstractEvents";
|
||||
|
||||
export class RestEvent extends Event {
|
||||
constructor(duration: number, app: Editor) {
|
||||
super(app);
|
||||
this.values["duration"] = duration;
|
||||
}
|
||||
constructor(duration: number, app: Editor) {
|
||||
super(app);
|
||||
this.values["duration"] = duration;
|
||||
}
|
||||
|
||||
_fallbackMethod = (): Event => {
|
||||
return RestEvent.createRestProxy(this.values["duration"], this.app);
|
||||
}
|
||||
_fallbackMethod = (): Event => {
|
||||
return RestEvent.createRestProxy(this.values["duration"], this.app);
|
||||
};
|
||||
|
||||
public static createRestProxy = (duration: number, app: Editor): RestEvent => {
|
||||
const instance = new RestEvent(duration, app);
|
||||
return new Proxy(instance, {
|
||||
// @ts-ignore
|
||||
get(target, propKey, receiver) {
|
||||
// @ts-ignore
|
||||
if (typeof target[propKey] === 'undefined') {
|
||||
return target._fallbackMethod;
|
||||
}
|
||||
// @ts-ignore
|
||||
return target[propKey];
|
||||
},
|
||||
// @ts-ignore
|
||||
set(target, propKey, value, receiver) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
public static createRestProxy = (
|
||||
duration: number,
|
||||
app: Editor
|
||||
): RestEvent => {
|
||||
const instance = new RestEvent(duration, app);
|
||||
return new Proxy(instance, {
|
||||
// @ts-ignore
|
||||
get(target, propKey, receiver) {
|
||||
// @ts-ignore
|
||||
if (typeof target[propKey] === "undefined") {
|
||||
return target._fallbackMethod;
|
||||
}
|
||||
// @ts-ignore
|
||||
return target[propKey];
|
||||
},
|
||||
// @ts-ignore
|
||||
set(target, propKey, value, receiver) {
|
||||
return false;
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
out = (): void => {
|
||||
// TODO?
|
||||
}
|
||||
|
||||
}
|
||||
out = (): void => {
|
||||
// TODO?
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user