Skip to content

Commit

Permalink
feat: expose resolver type
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 15, 2023
1 parent 3077533 commit 8a05219
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export type PromisifyFn<T> = ReturnType<T> extends Promise<any>
? T
: (...args: ArgumentsType<T>) => Promise<Awaited<ReturnType<T>>>

export type BirpcResolver = (name: string, resolved: Function) => Function | undefined

export interface ChannelOptions {
/**
* Function to post raw message
Expand Down Expand Up @@ -31,7 +33,7 @@ export interface ChannelOptions {
*
* For advanced use cases only
*/
resolver?: (name: string, resolved: Function) => Function | undefined
resolver?: BirpcResolver
}

export interface EventOptions<Remote> {
Expand Down

0 comments on commit 8a05219

Please sign in to comment.