Skip to content

Commit

Permalink
fix: correct clone() type
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangvvo committed May 4, 2023
1 parent 594cc6c commit da2a5b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EdgeRouter<Req extends Request = Request, Ctx = unknown> {
}

public clone() {
const r = new EdgeRouter();
const r = new EdgeRouter<Req, Ctx>();
r.router = this.router.clone();
return r;
}
Expand Down
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class NodeRouter<
}

public clone() {
const r = new NodeRouter();
const r = new NodeRouter<Req, Res>();
r.router = this.router.clone();
return r;
}
Expand Down

0 comments on commit da2a5b1

Please sign in to comment.