blob: 0ca355193193de3c843b5983b98093f7561df89b [file] [log] [blame]
/**
* From https://stackoverflow.com/questions/36871299/how-to-extend-function-with-es6-classes
*/
export default class ExtensibleFunction extends Function {
constructor(fn: Function) {
super();
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, no-constructor-return
return Object.setPrototypeOf(fn, new.target.prototype);
}
}