add overloads
This commit is contained in:
parent
f6d994e6a4
commit
86528a3335
|
@ -62,6 +62,7 @@ export default class Patcher {
|
|||
return this.patches[id] = patch;
|
||||
}
|
||||
|
||||
static get before() { return this.superpatch; }
|
||||
static superpatch(unresolveModule, functionName, callback, displayName) {
|
||||
const module = this.resolveModule(unresolveModule);
|
||||
if (!module || !module[functionName] || !(module[functionName] instanceof Function)) return null;
|
||||
|
@ -81,6 +82,7 @@ export default class Patcher {
|
|||
return superPatch;
|
||||
}
|
||||
|
||||
static get after() { return this.slavepatch; }
|
||||
static slavepatch(unresolveModule, functionName, callback, displayName) {
|
||||
const module = this.resolveModule(unresolveModule);
|
||||
if (!module || !module[functionName] || !(module[functionName] instanceof Function)) return null;
|
||||
|
|
Loading…
Reference in New Issue