-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose
createTrpcClient
in popup/options
- Loading branch information
Showing
9 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import { SetOptional } from 'type-fest'; | ||
import { CustomHandlerOptions, createCustomHandler as internalCreateCustomHandler } from './client-base'; | ||
import type { AnyTRPCRouter } from '@trpc/server'; | ||
import type { SetOptional } from 'type-fest'; | ||
import { | ||
CustomHandlerOptions, | ||
TrpcClientOptions, | ||
createCustomHandler as internalCreateCustomHandler, | ||
createTrpcClient as internalCreateTrpcClient, | ||
} from './client-base'; | ||
|
||
export const createCustomHandler = (options: SetOptional<CustomHandlerOptions, 'type'>) => | ||
internalCreateCustomHandler({ type: 'options', ...options }); | ||
|
||
export const createTrpcClient = <TRouter extends AnyTRPCRouter>(options: SetOptional<TrpcClientOptions, 'type'>) => | ||
internalCreateTrpcClient<TRouter>({ type: 'options', ...options }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import { SetOptional } from 'type-fest'; | ||
import { CustomHandlerOptions, createCustomHandler as internalCreateCustomHandler } from './client-base'; | ||
import type { AnyTRPCRouter } from '@trpc/server'; | ||
import type { SetOptional } from 'type-fest'; | ||
import { | ||
CustomHandlerOptions, | ||
TrpcClientOptions, | ||
createCustomHandler as internalCreateCustomHandler, | ||
createTrpcClient as internalCreateTrpcClient, | ||
} from './client-base'; | ||
|
||
export const createCustomHandler = (options: SetOptional<CustomHandlerOptions, 'type'>) => | ||
internalCreateCustomHandler({ type: 'popup', ...options }); | ||
|
||
export const createTrpcClient = <TRouter extends AnyTRPCRouter>(options: SetOptional<TrpcClientOptions, 'type'>) => | ||
internalCreateTrpcClient<TRouter>({ type: 'popup', ...options }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters