rename react to solid

This commit is contained in:
OrJDev
2022-11-01 10:11:13 +02:00
parent f67748fe9d
commit cfd0a6c7a0
7 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -644,10 +644,10 @@ type fooType<TRouter extends AnyRouter, TSSRContext = unknown> = GnClass<
>["fn"];
/**
* Infer the type of a `createReactQueryHooks` function
* Infer the type of a `createSolidQueryHooks` function
* @internal
*/
export type CreateReactQueryHooks<
export type CreateSolidQueryHooks<
TRouter extends AnyRouter,
TSSRContext = unknown
> = returnTypeInferer<fooType<TRouter, TSSRContext>>;
+3 -3
View File
@@ -1,16 +1,16 @@
import { AnyRouter } from "@trpc/server";
import { createRecursiveProxy } from "@trpc/server/shared";
import { getQueryKey } from "../../internals/getQueryKey";
import { CreateReactQueryHooks } from "../hooks/createHooksInternal";
import { type CreateSolidQueryHooks } from "../hooks/createHooksInternal";
/**
* Create proxy for decorating procedures
* @internal
*/
export function createReactProxyDecoration<
export function createSolidProxyDecoration<
TRouter extends AnyRouter,
TSSRContext = unknown
>(name: string, hooks: CreateReactQueryHooks<TRouter, TSSRContext>) {
>(name: string, hooks: CreateSolidQueryHooks<TRouter, TSSRContext>) {
return createRecursiveProxy((opts) => {
const args = opts.args;
+4 -4
View File
@@ -189,7 +189,7 @@ export type DecoratedProcedureUtilsRecord<TRouter extends AnyRouter> = {
type AnyDecoratedProcedure = DecorateProcedure<any, any>;
export type CreateReactUtilsProxy<
export type CreateSolidUtilsProxy<
TRouter extends AnyRouter,
TSSRContext
> = DecoratedProcedureUtilsRecord<TRouter> &
@@ -198,16 +198,16 @@ export type CreateReactUtilsProxy<
/**
* @internal
*/
export function createReactQueryUtilsProxy<
export function createSolidQueryUtilsProxy<
TRouter extends AnyRouter,
TSSRContext
>(context: TRPCContextState<AnyRouter, unknown>) {
type CreateReactUtilsProxyReturnType = CreateReactUtilsProxy<
type CreateSolidUtilsProxyReturnType = CreateSolidUtilsProxy<
TRouter,
TSSRContext
>;
return createFlatProxy<CreateReactUtilsProxyReturnType>((key) => {
return createFlatProxy<CreateSolidUtilsProxyReturnType>((key) => {
const contextName = key as typeof contextProps[number];
if (contextProps.includes(contextName)) {
return context[contextName];