Skip to content

Commit

Permalink
Merge pull request #894 from luhn/lastcall-undefined
Browse files Browse the repository at this point in the history
Change `lastCall` return type to `CallLog | undefined`
  • Loading branch information
wheresrhys authored Jan 11, 2025
2 parents 8a8e894 + 217f877 commit 104d4df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/fetch-mock/src/CallHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ class CallHistory {
called(filter?: CallHistoryFilter, options?: RouteConfig): boolean {
return Boolean(this.calls(filter, options).length);
}
lastCall(filter?: CallHistoryFilter, options?: RouteConfig): CallLog | void {
lastCall(
filter?: CallHistoryFilter,
options?: RouteConfig,
): CallLog | undefined {
return this.calls(filter, options).pop();
}

Expand Down

0 comments on commit 104d4df

Please sign in to comment.