@orpc/react 0.0.0-next.c59d67c → 0.0.0-next.db1f26d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import type { ContractProcedure, ContractRouter, SchemaOutput } from '@orpc/contract';
2
- import type { Procedure, Router } from '@orpc/server';
2
+ import type { Lazy, Procedure, Router } from '@orpc/server';
3
3
  import type { ORPCContext } from './react-context';
4
4
  import { type GeneralHooks } from './general-hooks';
5
5
  import { type ProcedureHooks } from './procedure-hooks';
@@ -7,7 +7,7 @@ export type ORPCHooksWithContractRouter<TRouter extends ContractRouter> = {
7
7
  [K in keyof TRouter]: TRouter[K] extends ContractProcedure<infer UInputSchema, infer UOutputSchema> ? ProcedureHooks<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> & GeneralHooks<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> : TRouter[K] extends ContractRouter ? ORPCHooksWithContractRouter<TRouter[K]> : never;
8
8
  } & GeneralHooks<undefined, undefined, unknown>;
9
9
  export type ORPCHooksWithRouter<TRouter extends Router<any>> = {
10
- [K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> ? ProcedureHooks<UInputSchema, UOutputSchema, UFuncOutput> & GeneralHooks<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? ORPCHooksWithRouter<TRouter[K]> : never;
10
+ [K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> | Lazy<Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput>> ? ProcedureHooks<UInputSchema, UOutputSchema, UFuncOutput> & GeneralHooks<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? ORPCHooksWithRouter<TRouter[K]> : never;
11
11
  } & GeneralHooks<undefined, undefined, unknown>;
12
12
  export interface CreateORPCHooksOptions<TRouter extends ContractRouter | Router<any>> {
13
13
  context: ORPCContext<TRouter>;
@@ -1,5 +1,5 @@
1
1
  import type { ContractProcedure, ContractRouter, SchemaOutput } from '@orpc/contract';
2
- import type { Procedure, Router } from '@orpc/server';
2
+ import type { Lazy, Procedure, Router } from '@orpc/server';
3
3
  import type { ORPCContextValue } from './react-context';
4
4
  import { type GeneralUtils } from './general-utils';
5
5
  import { type ProcedureUtils } from './procedure-utils';
@@ -7,7 +7,7 @@ export type ORPCUtilsWithContractRouter<TRouter extends ContractRouter> = {
7
7
  [K in keyof TRouter]: TRouter[K] extends ContractProcedure<infer UInputSchema, infer UOutputSchema> ? ProcedureUtils<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> & GeneralUtils<UInputSchema, UOutputSchema, SchemaOutput<UOutputSchema>> : TRouter[K] extends ContractRouter ? ORPCUtilsWithContractRouter<TRouter[K]> : never;
8
8
  } & GeneralUtils<undefined, undefined, unknown>;
9
9
  export type ORPCUtilsWithRouter<TRouter extends Router<any>> = {
10
- [K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> ? ProcedureUtils<UInputSchema, UOutputSchema, UFuncOutput> & GeneralUtils<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? ORPCUtilsWithRouter<TRouter[K]> : never;
10
+ [K in keyof TRouter]: TRouter[K] extends Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> | Lazy<Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput>> ? ProcedureUtils<UInputSchema, UOutputSchema, UFuncOutput> & GeneralUtils<UInputSchema, UOutputSchema, UFuncOutput> : TRouter[K] extends Router<any> ? ORPCUtilsWithRouter<TRouter[K]> : never;
11
11
  } & GeneralUtils<undefined, undefined, unknown>;
12
12
  export interface CreateORPCUtilsOptions<TRouter extends ContractRouter | Router<any>> {
13
13
  contextValue: ORPCContextValue<TRouter>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/react",
3
3
  "type": "module",
4
- "version": "0.0.0-next.c59d67c",
4
+ "version": "0.0.0-next.db1f26d",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -31,12 +31,12 @@
31
31
  "peerDependencies": {
32
32
  "@tanstack/react-query": ">=5.59.0",
33
33
  "react": ">=18.3.0",
34
- "@orpc/client": "0.0.0-next.c59d67c",
35
- "@orpc/server": "0.0.0-next.c59d67c",
36
- "@orpc/contract": "0.0.0-next.c59d67c"
34
+ "@orpc/client": "0.0.0-next.db1f26d",
35
+ "@orpc/contract": "0.0.0-next.db1f26d",
36
+ "@orpc/server": "0.0.0-next.db1f26d"
37
37
  },
38
38
  "dependencies": {
39
- "@orpc/shared": "0.0.0-next.c59d67c"
39
+ "@orpc/shared": "0.0.0-next.db1f26d"
40
40
  },
41
41
  "devDependencies": {
42
42
  "zod": "^3.23.8"