Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/shared/src/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type Interceptor<
> = (options: InterceptorOptions<TOptions, TResult>) => TResult

/**
* Can used for interceptors or middlewares
* Can be used for interceptors or middlewares
Comment thread
dinwwwh marked this conversation as resolved.
*/
export function onStart<T, TOptions extends { next(): any }, TRest extends any[]>(
callback: NoInfer<(options: TOptions, ...rest: TRest) => Promisable<void>>,
Expand All @@ -28,7 +28,7 @@ export function onStart<T, TOptions extends { next(): any }, TRest extends any[]
}

/**
* Can used for interceptors or middlewares
* Can be used for interceptors or middlewares
Comment thread
dinwwwh marked this conversation as resolved.
*/
export function onSuccess<T, TOptions extends { next(): any }, TRest extends any[]>(
callback: NoInfer<(result: Awaited<ReturnType<TOptions['next']>>, options: TOptions, ...rest: TRest) => Promisable<void>>,
Expand All @@ -41,7 +41,7 @@ export function onSuccess<T, TOptions extends { next(): any }, TRest extends any
}

/**
* Can used for interceptors or middlewares
* Can be used for interceptors or middlewares
Comment thread
dinwwwh marked this conversation as resolved.
*/
export function onError<T, TOptions extends { next(): any }, TRest extends any[]>(
callback: NoInfer<(
Expand All @@ -66,7 +66,7 @@ export type OnFinishState<TResult, TError>
| [error: null, data: TResult, isSuccess: true]

/**
* Can used for interceptors or middlewares
* Can be used for interceptors or middlewares
Comment thread
dinwwwh marked this conversation as resolved.
*/
export function onFinish<T, TOptions extends { next(): any }, TRest extends any[]>(
callback: NoInfer<(
Expand Down
Loading