Skip to content

Commit

Permalink
fixed broken ExtensibleFunction class
Browse files Browse the repository at this point in the history
  • Loading branch information
Emrio committed Sep 15, 2021
1 parent 6084b45 commit 6419079
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ExtensibleFunction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export interface ExtensibleFunction <F extends (...args: any) => any> {
new (f: F): ExtensibleFunction<F>
(...args: Parameters<F>): ReturnType<F>
Expand All @@ -11,6 +10,6 @@ export class ExtensibleFunction <F extends (...args: any) => any> extends Functi
constructor (f: F) {
super()

Object.setPrototypeOf(f, new.target.prototype)
return Object.setPrototypeOf(f, new.target.prototype)
}
}

0 comments on commit 6419079

Please sign in to comment.