Skip to content

Commit

Permalink
Remove deprecated call function for async hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyFuller committed Sep 14, 2023
1 parent 9278c83 commit f1d6bf8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions components/hooksImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,6 @@ export class AsyncSeriesHook<Params> extends BaseImpl<Params, Promise<void>> {
this._intercepts = []
}

/**
* Async hooks cannot be called from a sync function - use {@link callAsync} instead!
* This function will only throw an error.
*
* @throws {Error} Always throws an error, see the note above.
* @deprecated
*/
public call(): Promise<void> {
throw new Error("Can't call an async hook with the sync method.")
}

public async callAsync(...params: AsArray<Params>): Promise<void> {
const context = {}

Expand Down

0 comments on commit f1d6bf8

Please sign in to comment.