@trpc/server 11.0.0-next-beta.221 → 11.0.0-next-beta.228

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.
@@ -2,7 +2,7 @@ export { TRPCError,
2
2
  /**
3
3
  * @deprecated use `experimental_trpcMiddleware` instead
4
4
  */
5
- experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type ProcedureRouterRecord as TRPCProcedureRouterRecord, type ProcedureArgs as TRPCProcedureArgs, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, } from '../../unstable-core-do-not-import';
5
+ experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type ProcedureRouterRecord as TRPCProcedureRouterRecord, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, type ProcedureOptions as TRPCProcedureOptions, } from '../../unstable-core-do-not-import';
6
6
  export type {
7
7
  /**
8
8
  * @deprecated use `AnyTRPCProcedure` instead
@@ -44,10 +44,6 @@ AnyQueryProcedure,
44
44
  * @deprecated use `TRPCProcedureRouterRecord` instead
45
45
  */
46
46
  ProcedureRouterRecord,
47
- /**
48
- * @deprecated use `TRPCProcedureArgs` instead
49
- */
50
- ProcedureArgs,
51
47
  /**
52
48
  * @deprecated use `AnyTRPCSubscriptionProcedure` instead
53
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,aAAa,IAAI,iBAAiB,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,wBAAwB,IAAI,4BAA4B,GAC9D,MAAM,mCAAmC,CAAC;AAE3C,YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO;AACL;;GAEG;AACH,aAAa;AAEb;;GAEG;AACH,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IACxE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,aAAa,IAAI,iBAAiB,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,wBAAwB,IAAI,4BAA4B,EAC7D,KAAK,gBAAgB,IAAI,oBAAoB,GAC9C,MAAM,mCAAmC,CAAC;AAE3C,YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO;AACL;;GAEG;AACH,aAAa;AAEb;;GAEG;AACH,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IACxE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('../../unstable-core-do-not-import/rpc/codes.js');
4
3
  var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
4
+ require('../../unstable-core-do-not-import/rpc/codes.js');
5
5
  require('../../unstable-core-do-not-import/rootConfig.js');
6
6
  var resolveHTTPResponse = require('../../unstable-core-do-not-import/http/resolveHTTPResponse.js');
7
7
  var utils = require('./utils.js');
@@ -1,5 +1,5 @@
1
- import '../../unstable-core-do-not-import/rpc/codes.mjs';
2
1
  import { TRPCError } from '../../unstable-core-do-not-import/error/TRPCError.mjs';
2
+ import '../../unstable-core-do-not-import/rpc/codes.mjs';
3
3
  import '../../unstable-core-do-not-import/rootConfig.mjs';
4
4
  import { resolveHTTPResponse } from '../../unstable-core-do-not-import/http/resolveHTTPResponse.mjs';
5
5
  import { getPath, getHTTPMethod, isPayloadV1, transformHeaders, isPayloadV2, UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE } from './utils.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('../../unstable-core-do-not-import/rpc/codes.js');
4
3
  var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
4
+ require('../../unstable-core-do-not-import/rpc/codes.js');
5
5
  require('../../unstable-core-do-not-import/rootConfig.js');
6
6
 
7
7
  /**
@@ -1,5 +1,5 @@
1
- import '../../unstable-core-do-not-import/rpc/codes.mjs';
2
1
  import { TRPCError } from '../../unstable-core-do-not-import/error/TRPCError.mjs';
2
+ import '../../unstable-core-do-not-import/rpc/codes.mjs';
3
3
  import '../../unstable-core-do-not-import/rootConfig.mjs';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var getErrorShape = require('../unstable-core-do-not-import/error/getErrorShape.js');
4
3
  var TRPCError = require('../unstable-core-do-not-import/error/TRPCError.js');
4
+ var getErrorShape = require('../unstable-core-do-not-import/error/getErrorShape.js');
5
5
  require('../unstable-core-do-not-import/rootConfig.js');
6
6
  require('../unstable-core-do-not-import/rpc/codes.js');
7
7
  var nodeHTTPRequestHandler = require('./node-http/nodeHTTPRequestHandler.js');
@@ -1,5 +1,5 @@
1
- import { getErrorShape } from '../unstable-core-do-not-import/error/getErrorShape.mjs';
2
1
  import { TRPCError } from '../unstable-core-do-not-import/error/TRPCError.mjs';
2
+ import { getErrorShape } from '../unstable-core-do-not-import/error/getErrorShape.mjs';
3
3
  import '../unstable-core-do-not-import/rootConfig.mjs';
4
4
  import '../unstable-core-do-not-import/rpc/codes.mjs';
5
5
  import { nodeHTTPRequestHandler } from './node-http/nodeHTTPRequestHandler.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('../../../../unstable-core-do-not-import/rpc/codes.js');
4
3
  var TRPCError = require('../../../../unstable-core-do-not-import/error/TRPCError.js');
4
+ require('../../../../unstable-core-do-not-import/rpc/codes.js');
5
5
  require('../../../../unstable-core-do-not-import/rootConfig.js');
6
6
 
7
7
  // @trpc/server
@@ -1,5 +1,5 @@
1
- import '../../../../unstable-core-do-not-import/rpc/codes.mjs';
2
1
  import { TRPCError } from '../../../../unstable-core-do-not-import/error/TRPCError.mjs';
2
+ import '../../../../unstable-core-do-not-import/rpc/codes.mjs';
3
3
  import '../../../../unstable-core-do-not-import/rootConfig.mjs';
4
4
 
5
5
  // @trpc/server
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var getErrorShape = require('../unstable-core-do-not-import/error/getErrorShape.js');
4
3
  var TRPCError = require('../unstable-core-do-not-import/error/TRPCError.js');
4
+ var getErrorShape = require('../unstable-core-do-not-import/error/getErrorShape.js');
5
5
  require('../unstable-core-do-not-import/rootConfig.js');
6
6
  var router = require('../unstable-core-do-not-import/router.js');
7
7
  var transformer = require('../unstable-core-do-not-import/transformer.js');
@@ -1,5 +1,5 @@
1
- import { getErrorShape } from '../unstable-core-do-not-import/error/getErrorShape.mjs';
2
1
  import { TRPCError, getTRPCErrorFromUnknown } from '../unstable-core-do-not-import/error/TRPCError.mjs';
2
+ import { getErrorShape } from '../unstable-core-do-not-import/error/getErrorShape.mjs';
3
3
  import '../unstable-core-do-not-import/rootConfig.mjs';
4
4
  import { callProcedure } from '../unstable-core-do-not-import/router.mjs';
5
5
  import { transformTRPCResponse } from '../unstable-core-do-not-import/transformer.mjs';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundleSize": 102737,
3
- "bundleOrigSize": 159997,
4
- "bundleReduction": 35.79,
3
+ "bundleOrigSize": 159589,
4
+ "bundleReduction": 35.62,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/adapters/ws.ts",
@@ -48,7 +48,7 @@
48
48
  {
49
49
  "id": "/src/unstable-core-do-not-import/router.ts",
50
50
  "size": 5634,
51
- "origSize": 10592,
51
+ "origSize": 10570,
52
52
  "renderedExports": [
53
53
  "createRouterFactory",
54
54
  "callProcedure",
@@ -62,7 +62,7 @@
62
62
  "/src/unstable-core-do-not-import/initTRPC.ts"
63
63
  ],
64
64
  "percent": 5.48,
65
- "reduction": 46.81
65
+ "reduction": 46.7
66
66
  },
67
67
  {
68
68
  "id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
@@ -455,11 +455,11 @@
455
455
  "dependents": [
456
456
  "/src/unstable-core-do-not-import/index.ts",
457
457
  "/src/unstable-core-do-not-import/rpc/codes.ts",
458
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
458
459
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
459
460
  "/src/unstable-core-do-not-import/middleware.ts",
460
461
  "/src/unstable-core-do-not-import/router.ts",
461
462
  "/src/unstable-core-do-not-import/transformer.ts",
462
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
463
463
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
464
464
  ],
465
465
  "percent": 0.98,
@@ -629,7 +629,7 @@
629
629
  {
630
630
  "id": "/src/unstable-core-do-not-import/procedure.ts",
631
631
  "size": 75,
632
- "origSize": 3188,
632
+ "origSize": 2840,
633
633
  "renderedExports": [
634
634
  "procedureTypes"
635
635
  ],
@@ -639,7 +639,7 @@
639
639
  "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts"
640
640
  ],
641
641
  "percent": 0.07,
642
- "reduction": 97.65
642
+ "reduction": 97.36
643
643
  },
644
644
  {
645
645
  "id": "/src/unstable-core-do-not-import/error/formatter.ts",
@@ -667,9 +667,9 @@
667
667
  "reduction": 100
668
668
  },
669
669
  {
670
- "id": "/src/index.ts",
670
+ "id": "/src/rpc.ts",
671
671
  "size": 0,
672
- "origSize": 32,
672
+ "origSize": 36,
673
673
  "renderedExports": [],
674
674
  "removedExports": [],
675
675
  "dependents": [],
@@ -677,9 +677,9 @@
677
677
  "reduction": 100
678
678
  },
679
679
  {
680
- "id": "/src/rpc.ts",
680
+ "id": "/src/index.ts",
681
681
  "size": 0,
682
- "origSize": 36,
682
+ "origSize": 32,
683
683
  "renderedExports": [],
684
684
  "removedExports": [],
685
685
  "dependents": [],
@@ -711,7 +711,17 @@
711
711
  {
712
712
  "id": "/src/unstable-core-do-not-import/index.ts",
713
713
  "size": 0,
714
- "origSize": 2877,
714
+ "origSize": 2839,
715
+ "renderedExports": [],
716
+ "removedExports": [],
717
+ "dependents": [],
718
+ "percent": 0,
719
+ "reduction": 100
720
+ },
721
+ {
722
+ "id": "/src/adapters/fastify/index.ts",
723
+ "size": 0,
724
+ "origSize": 78,
715
725
  "renderedExports": [],
716
726
  "removedExports": [],
717
727
  "dependents": [],
@@ -741,16 +751,6 @@
741
751
  ],
742
752
  "percent": 0,
743
753
  "reduction": 100
744
- },
745
- {
746
- "id": "/src/adapters/fastify/index.ts",
747
- "size": 0,
748
- "origSize": 78,
749
- "renderedExports": [],
750
- "removedExports": [],
751
- "dependents": [],
752
- "percent": 0,
753
- "reduction": 100
754
754
  }
755
755
  ],
756
756
  "moduleCount": 51
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
4
3
  var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
4
+ var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
5
5
  var initTRPC = require('./unstable-core-do-not-import/initTRPC.js');
6
6
  var middleware = require('./unstable-core-do-not-import/middleware.js');
7
7
  var router = require('./unstable-core-do-not-import/router.js');
@@ -11,9 +11,9 @@ require('./unstable-core-do-not-import/rpc/codes.js');
11
11
 
12
12
 
13
13
 
14
- exports.getErrorShape = getErrorShape.getErrorShape;
15
14
  exports.TRPCError = TRPCError.TRPCError;
16
15
  exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
16
+ exports.getErrorShape = getErrorShape.getErrorShape;
17
17
  exports.initTRPC = initTRPC.initTRPC;
18
18
  exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
19
19
  exports.experimental_trpcMiddleware = middleware.experimental_standaloneMiddleware;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
2
1
  export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
2
+ export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
3
3
  export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
4
4
  export { experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware } from './unstable-core-do-not-import/middleware.mjs';
5
5
  export { callProcedure, callProcedure as callTRPCProcedure } from './unstable-core-do-not-import/router.mjs';
@@ -8,30 +8,30 @@
8
8
  *
9
9
  * If you seem to need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
10
10
  */
11
- export type { DefaultErrorShape, DefaultErrorData } from './error/formatter';
12
- export { getErrorShape } from './error/getErrorShape';
13
11
  export { TRPCError, getCauseFromUnknown, getTRPCErrorFromUnknown, } from './error/TRPCError';
12
+ export type { DefaultErrorData, DefaultErrorShape } from './error/formatter';
13
+ export { getErrorShape } from './error/getErrorShape';
14
14
  export { initTRPC } from './initTRPC';
15
- export type { AnyMiddlewareFunction, MiddlewareFunction, MiddlewareBuilder, } from './middleware';
16
15
  export { createInputMiddleware, createOutputMiddleware, experimental_standaloneMiddleware, middlewareMarker, } from './middleware';
16
+ export type { AnyMiddlewareFunction, MiddlewareBuilder, MiddlewareFunction, } from './middleware';
17
17
  export type { inferParser } from './parser';
18
- export type { Procedure, ProcedureType, AnyProcedure, AnyQueryProcedure, AnyMutationProcedure, AnySubscriptionProcedure, ProcedureArgs, ProcedureOptions, MutationProcedure, inferHandlerInput, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, inferProcedureParams, QueryProcedure, SubscriptionProcedure, } from './procedure';
19
18
  export { procedureTypes } from './procedure';
19
+ export type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnySubscriptionProcedure, MutationProcedure, Procedure, ProcedureOptions, ProcedureType, QueryProcedure, SubscriptionProcedure, inferProcedureInput, inferProcedureOutput, inferProcedureParams, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, } from './procedure';
20
+ export { createBuilder, unsetMarker } from './procedureBuilder';
20
21
  export type { ProcedureBuilder } from './procedureBuilder';
21
- export { unsetMarker, createBuilder } from './procedureBuilder';
22
22
  export type { AnyRootConfig, RootConfig } from './rootConfig';
23
- export type { AnyRouter, ProcedureRecord, ProcedureRouterRecord, CreateRouterInner, Router, RouterCaller, AnyRouterDef, inferRouterContext, inferRouterError, inferRouterInputs, inferRouterMeta, inferRouterOutputs, createRouterFactory, } from './router';
23
+ export type { AnyRouter, AnyRouterDef, CreateRouterInner, ProcedureRecord, ProcedureRouterRecord, Router, RouterCaller, createRouterFactory, inferRouterContext, inferRouterError, inferRouterInputs, inferRouterMeta, inferRouterOutputs, } from './router';
24
24
  export type { TRPCInferrable, inferErrorShape } from './TRPCInferrable';
25
25
  export { callProcedure, mergeRouters } from './router';
26
- export type { CombinedDataTransformer, CombinedDataTransformerClient, DataTransformer, DataTransformerOptions, DefaultDataTransformer, } from './transformer';
27
26
  export { transformResult, transformTRPCResponse } from './transformer';
27
+ export type { CombinedDataTransformer, CombinedDataTransformerClient, DataTransformer, DataTransformerOptions, DefaultDataTransformer, } from './transformer';
28
28
  export { createFlatProxy, createRecursiveProxy } from './createProxy';
29
- export type { SerializeObject, Serialize } from './serialize';
30
- export type { DeepPartial, Dict, DistributiveOmit, Filter, FilterKeys, Maybe, MaybePromise, Simplify, Unwrap, WithoutIndexSignature, Overwrite, PickFirstDefined, ValidateShape, IntersectionError, ProtectedIntersection, } from './types';
29
+ export type { Serialize, SerializeObject } from './serialize';
30
+ export type { DeepPartial, Dict, DistributiveOmit, Filter, FilterKeys, IntersectionError, Maybe, MaybePromise, Overwrite, PickFirstDefined, ProtectedIntersection, Simplify, Unwrap, ValidateShape, WithoutIndexSignature, } from './types';
31
31
  export { isObject } from './utils';
32
32
  /**
33
33
  * These should be re-exported from separate entrypoints in server package
34
34
  */
35
- export * from './rpc';
36
35
  export * from './http';
36
+ export * from './rpc';
37
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,+BAA+B,EAC/B,kCAAkC,EAClC,oBAAoB,EACpB,cAAc,EACd,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,YAAY,EACV,SAAS,EACT,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACvD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGtE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE9D,YAAY,EACV,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,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,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGtE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9D,YAAY,EACV,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,MAAM,EACN,aAAa,EACb,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var getErrorShape = require('./error/getErrorShape.js');
4
3
  var TRPCError = require('./error/TRPCError.js');
4
+ var getErrorShape = require('./error/getErrorShape.js');
5
5
  var initTRPC = require('./initTRPC.js');
6
6
  var middleware = require('./middleware.js');
7
7
  var procedure = require('./procedure.js');
@@ -10,19 +10,19 @@ var router = require('./router.js');
10
10
  var transformer = require('./transformer.js');
11
11
  var createProxy = require('./createProxy.js');
12
12
  var utils = require('./utils.js');
13
- var codes = require('./rpc/codes.js');
14
- var parseTRPCMessage = require('./rpc/parseTRPCMessage.js');
15
13
  var getHTTPStatusCode = require('./http/getHTTPStatusCode.js');
16
14
  var resolveHTTPResponse = require('./http/resolveHTTPResponse.js');
17
15
  var batchStreamFormatter = require('./http/batchStreamFormatter.js');
18
16
  var contentType = require('./http/contentType.js');
17
+ var codes = require('./rpc/codes.js');
18
+ var parseTRPCMessage = require('./rpc/parseTRPCMessage.js');
19
19
 
20
20
 
21
21
 
22
- exports.getErrorShape = getErrorShape.getErrorShape;
23
22
  exports.TRPCError = TRPCError.TRPCError;
24
23
  exports.getCauseFromUnknown = TRPCError.getCauseFromUnknown;
25
24
  exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
25
+ exports.getErrorShape = getErrorShape.getErrorShape;
26
26
  exports.initTRPC = initTRPC.initTRPC;
27
27
  exports.createInputMiddleware = middleware.createInputMiddleware;
28
28
  exports.createOutputMiddleware = middleware.createOutputMiddleware;
@@ -38,11 +38,11 @@ exports.transformTRPCResponse = transformer.transformTRPCResponse;
38
38
  exports.createFlatProxy = createProxy.createFlatProxy;
39
39
  exports.createRecursiveProxy = createProxy.createRecursiveProxy;
40
40
  exports.isObject = utils.isObject;
41
- exports.TRPC_ERROR_CODES_BY_KEY = codes.TRPC_ERROR_CODES_BY_KEY;
42
- exports.TRPC_ERROR_CODES_BY_NUMBER = codes.TRPC_ERROR_CODES_BY_NUMBER;
43
- exports.parseTRPCMessage = parseTRPCMessage.parseTRPCMessage;
44
41
  exports.getHTTPStatusCode = getHTTPStatusCode.getHTTPStatusCode;
45
42
  exports.getHTTPStatusCodeFromError = getHTTPStatusCode.getHTTPStatusCodeFromError;
46
43
  exports.resolveHTTPResponse = resolveHTTPResponse.resolveHTTPResponse;
47
44
  exports.getBatchStreamFormatter = batchStreamFormatter.getBatchStreamFormatter;
48
45
  exports.getJsonContentTypeInputs = contentType.getJsonContentTypeInputs;
46
+ exports.TRPC_ERROR_CODES_BY_KEY = codes.TRPC_ERROR_CODES_BY_KEY;
47
+ exports.TRPC_ERROR_CODES_BY_NUMBER = codes.TRPC_ERROR_CODES_BY_NUMBER;
48
+ exports.parseTRPCMessage = parseTRPCMessage.parseTRPCMessage;
@@ -1,5 +1,5 @@
1
- export { getErrorShape } from './error/getErrorShape.mjs';
2
1
  export { TRPCError, getCauseFromUnknown, getTRPCErrorFromUnknown } from './error/TRPCError.mjs';
2
+ export { getErrorShape } from './error/getErrorShape.mjs';
3
3
  export { initTRPC } from './initTRPC.mjs';
4
4
  export { createInputMiddleware, createOutputMiddleware, experimental_standaloneMiddleware, middlewareMarker } from './middleware.mjs';
5
5
  export { procedureTypes } from './procedure.mjs';
@@ -8,9 +8,9 @@ export { callProcedure, mergeRouters } from './router.mjs';
8
8
  export { transformResult, transformTRPCResponse } from './transformer.mjs';
9
9
  export { createFlatProxy, createRecursiveProxy } from './createProxy.mjs';
10
10
  export { isObject } from './utils.mjs';
11
- export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './rpc/codes.mjs';
12
- export { parseTRPCMessage } from './rpc/parseTRPCMessage.mjs';
13
11
  export { getHTTPStatusCode, getHTTPStatusCodeFromError } from './http/getHTTPStatusCode.mjs';
14
12
  export { resolveHTTPResponse } from './http/resolveHTTPResponse.mjs';
15
13
  export { getBatchStreamFormatter } from './http/batchStreamFormatter.mjs';
16
14
  export { getJsonContentTypeInputs } from './http/contentType.mjs';
15
+ export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './rpc/codes.mjs';
16
+ export { parseTRPCMessage } from './rpc/parseTRPCMessage.mjs';
@@ -19,10 +19,6 @@ export interface ProcedureOptions {
19
19
  context?: ClientContext;
20
20
  signal?: AbortSignal;
21
21
  }
22
- /**
23
- * @internal
24
- */
25
- export type ProcedureArgs<TParams extends AnyProcedure['_def']> = void extends TParams['_input_in'] ? [input?: undefined | void, opts?: ProcedureOptions] : undefined extends TParams['_input_in'] ? [input?: TParams['_input_in'] | void, opts?: ProcedureOptions] : [input: TParams['_input_in'], opts?: ProcedureOptions];
26
22
  interface BuiltProcedureDef {
27
23
  input: unknown;
28
24
  output: unknown;
@@ -64,8 +60,7 @@ export type AnyProcedure = Procedure<ProcedureType, any>;
64
60
  export type inferTransformedProcedureOutput<TInferrable extends TRPCInferrable, TProcedure extends AnyProcedure> = inferConfig<TInferrable>['transformer'] extends DefaultDataTransformer ? Serialize<TProcedure['_def']['_output_out']> : TProcedure['_def']['_output_out'];
65
61
  /** @internal */
66
62
  export type inferTransformedSubscriptionOutput<TInferrable extends TRPCInferrable, TProcedure extends AnyProcedure> = inferConfig<TInferrable>['transformer'] extends DefaultDataTransformer ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>> : inferObservableValue<TProcedure['_def']['_output_out']>;
67
- export type inferHandlerInput<TProcedure extends AnyProcedure> = ProcedureArgs<inferProcedureParams<TProcedure>>;
68
- export type inferProcedureInput<TProcedure extends AnyProcedure> = inferProcedureParams<TProcedure>['_input_in'];
63
+ export type inferProcedureInput<TProcedure extends AnyProcedure> = undefined extends inferProcedureParams<TProcedure>['_input_in'] ? void | inferProcedureParams<TProcedure>['_input_in'] : inferProcedureParams<TProcedure>['_input_in'];
69
64
  export type inferProcedureParams<TProcedure> = TProcedure extends AnyProcedure ? TProcedure['_def'] : never;
70
65
  export type inferProcedureOutput<TProcedure> = inferProcedureParams<TProcedure>['_output_out'];
71
66
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/procedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,eAAO,MAAM,cAAc,gDAAiD,CAAC;AAC7E;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,C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C,UAAU,SAAS,YAAY,IAC7D,SAAS,SAAS,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,GAC3D,IAAI,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,GACpD,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,CAAC;AAEpD,MAAM,MAAM,oBAAoB,CAAC,UAAU,IAAI,UAAU,SAAS,YAAY,GAC1E,UAAU,CAAC,MAAM,CAAC,GAClB,KAAK,CAAC;AACV,MAAM,MAAM,oBAAoB,CAAC,UAAU,IACzC,oBAAoB,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AnyProcedure, inferProcedureInput, inferTransformedProcedureOutput, ProcedureArgs } from './procedure';
1
+ import type { AnyProcedure, inferProcedureInput, inferTransformedProcedureOutput } from './procedure';
2
2
  import type { ProcedureCallOptions } from './procedureBuilder';
3
3
  import type { AnyRootConfig } from './rootConfig';
4
4
  import type { MaybePromise } from './types';
@@ -15,7 +15,7 @@ export interface RouterDef<TConfig extends AnyRootConfig, TRecord extends Proced
15
15
  record: TRecord;
16
16
  }
17
17
  export type AnyRouterDef<TConfig extends AnyRootConfig = AnyRootConfig> = RouterDef<TConfig, any>;
18
- type DecorateProcedure<TProcedure extends AnyProcedure> = (input: ProcedureArgs<TProcedure['_def']>[0]) => Promise<TProcedure['_def']['_output_out']>;
18
+ type DecorateProcedure<TProcedure extends AnyProcedure> = (input: inferProcedureInput<TProcedure>) => Promise<TProcedure['_def']['_output_out']>;
19
19
  /**
20
20
  * @internal
21
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/router.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,+BAA+B,EAC/B,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,M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,UAAU,CAAC,QAAQ,CAAC,CAAC;CACvD,CACF,GACD,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AAE9C,wBAAgB,YAAY,CAAC,QAAQ,SAAS,SAAS,EAAE,EACvD,GAAG,UAAU,EAAE,CAAC,GAAG,QAAQ,CAAC,GAC3B,YAAY,CAAC,QAAQ,CAAC,CAmDxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-next-beta.221+83786ca57",
3
+ "version": "11.0.0-next-beta.228+38f3240e9",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -157,5 +157,5 @@
157
157
  "funding": [
158
158
  "https://trpc.io/sponsor"
159
159
  ],
160
- "gitHead": "83786ca5730761084749695700db1f2d7fa4270d"
160
+ "gitHead": "38f3240e90b089d5e6edd037061c35c00af4c9ba"
161
161
  }
@@ -27,8 +27,8 @@ export {
27
27
  type AnyMutationProcedure as AnyTRPCMutationProcedure,
28
28
  type AnyQueryProcedure as AnyTRPCQueryProcedure,
29
29
  type ProcedureRouterRecord as TRPCProcedureRouterRecord,
30
- type ProcedureArgs as TRPCProcedureArgs,
31
30
  type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure,
31
+ type ProcedureOptions as TRPCProcedureOptions,
32
32
  } from '../../unstable-core-do-not-import';
33
33
 
34
34
  export type {
@@ -75,10 +75,6 @@ export type {
75
75
  * @deprecated use `TRPCProcedureRouterRecord` instead
76
76
  */
77
77
  ProcedureRouterRecord,
78
- /**
79
- * @deprecated use `TRPCProcedureArgs` instead
80
- */
81
- ProcedureArgs,
82
78
  /**
83
79
  * @deprecated use `AnyTRPCSubscriptionProcedure` instead
84
80
  */
@@ -8,68 +8,67 @@
8
8
  *
9
9
  * If you seem to need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
10
10
  */
11
- export type { DefaultErrorShape, DefaultErrorData } from './error/formatter';
12
- export { getErrorShape } from './error/getErrorShape';
13
11
  export {
14
12
  TRPCError,
15
13
  getCauseFromUnknown,
16
14
  getTRPCErrorFromUnknown,
17
15
  } from './error/TRPCError';
16
+ export type { DefaultErrorData, DefaultErrorShape } from './error/formatter';
17
+ export { getErrorShape } from './error/getErrorShape';
18
18
 
19
19
  export { initTRPC } from './initTRPC';
20
- export type {
21
- AnyMiddlewareFunction,
22
- MiddlewareFunction,
23
- MiddlewareBuilder,
24
- } from './middleware';
25
20
  export {
26
21
  createInputMiddleware,
27
22
  createOutputMiddleware,
28
23
  experimental_standaloneMiddleware,
29
24
  middlewareMarker,
30
25
  } from './middleware';
26
+ export type {
27
+ AnyMiddlewareFunction,
28
+ MiddlewareBuilder,
29
+ MiddlewareFunction,
30
+ } from './middleware';
31
31
  export type { inferParser } from './parser';
32
+ export { procedureTypes } from './procedure';
32
33
  export type {
33
- Procedure,
34
- ProcedureType,
34
+ AnyMutationProcedure,
35
35
  AnyProcedure,
36
36
  AnyQueryProcedure,
37
- AnyMutationProcedure,
38
37
  AnySubscriptionProcedure,
39
- ProcedureArgs,
40
- ProcedureOptions,
41
38
  MutationProcedure,
42
- inferHandlerInput,
39
+ Procedure,
40
+ ProcedureOptions,
41
+ ProcedureType,
42
+ QueryProcedure,
43
+ SubscriptionProcedure,
43
44
  inferProcedureInput,
44
45
  inferProcedureOutput,
46
+ inferProcedureParams,
45
47
  inferTransformedProcedureOutput,
46
48
  inferTransformedSubscriptionOutput,
47
- inferProcedureParams,
48
- QueryProcedure,
49
- SubscriptionProcedure,
50
49
  } from './procedure';
51
- export { procedureTypes } from './procedure';
50
+ export { createBuilder, unsetMarker } from './procedureBuilder';
52
51
  export type { ProcedureBuilder } from './procedureBuilder';
53
- export { unsetMarker, createBuilder } from './procedureBuilder';
54
52
  export type { AnyRootConfig, RootConfig } from './rootConfig';
55
53
  export type {
56
54
  AnyRouter,
55
+ AnyRouterDef,
56
+ CreateRouterInner,
57
57
  ProcedureRecord,
58
58
  ProcedureRouterRecord,
59
- CreateRouterInner,
60
59
  Router,
61
60
  RouterCaller,
62
- AnyRouterDef,
61
+ createRouterFactory,
63
62
  inferRouterContext,
64
63
  inferRouterError,
65
64
  inferRouterInputs,
66
65
  inferRouterMeta,
67
66
  inferRouterOutputs,
68
- createRouterFactory,
69
67
  } from './router';
70
68
 
71
69
  export type { TRPCInferrable, inferErrorShape } from './TRPCInferrable';
72
70
  export { callProcedure, mergeRouters } from './router';
71
+ export { transformResult, transformTRPCResponse } from './transformer';
73
72
  export type {
74
73
  CombinedDataTransformer,
75
74
  CombinedDataTransformerClient,
@@ -77,12 +76,11 @@ export type {
77
76
  DataTransformerOptions,
78
77
  DefaultDataTransformer,
79
78
  } from './transformer';
80
- export { transformResult, transformTRPCResponse } from './transformer';
81
79
 
82
80
  export { createFlatProxy, createRecursiveProxy } from './createProxy';
83
81
 
84
82
  // For `.d.ts` files https://github.com/trpc/trpc/issues/3943
85
- export type { SerializeObject, Serialize } from './serialize';
83
+ export type { Serialize, SerializeObject } from './serialize';
86
84
 
87
85
  export type {
88
86
  DeepPartial,
@@ -90,21 +88,21 @@ export type {
90
88
  DistributiveOmit,
91
89
  Filter,
92
90
  FilterKeys,
91
+ IntersectionError,
93
92
  Maybe,
94
93
  MaybePromise,
95
- Simplify,
96
- Unwrap,
97
- WithoutIndexSignature,
98
94
  Overwrite,
99
95
  PickFirstDefined,
100
- ValidateShape,
101
- IntersectionError,
102
96
  ProtectedIntersection,
97
+ Simplify,
98
+ Unwrap,
99
+ ValidateShape,
100
+ WithoutIndexSignature,
103
101
  } from './types';
104
102
  export { isObject } from './utils';
105
103
 
106
104
  /**
107
105
  * These should be re-exported from separate entrypoints in server package
108
106
  */
109
- export * from './rpc';
110
107
  export * from './http';
108
+ export * from './rpc';
@@ -23,16 +23,6 @@ export interface ProcedureOptions {
23
23
  signal?: AbortSignal;
24
24
  }
25
25
 
26
- /**
27
- * @internal
28
- */
29
- export type ProcedureArgs<TParams extends AnyProcedure['_def']> =
30
- void extends TParams['_input_in']
31
- ? [input?: undefined | void, opts?: ProcedureOptions]
32
- : undefined extends TParams['_input_in']
33
- ? [input?: TParams['_input_in'] | void, opts?: ProcedureOptions]
34
- : [input: TParams['_input_in'], opts?: ProcedureOptions];
35
-
36
26
  interface BuiltProcedureDef {
37
27
  input: unknown;
38
28
  output: unknown;
@@ -94,12 +84,10 @@ export type inferTransformedSubscriptionOutput<
94
84
  ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>>
95
85
  : inferObservableValue<TProcedure['_def']['_output_out']>;
96
86
 
97
- export type inferHandlerInput<TProcedure extends AnyProcedure> = ProcedureArgs<
98
- inferProcedureParams<TProcedure>
99
- >;
100
-
101
87
  export type inferProcedureInput<TProcedure extends AnyProcedure> =
102
- inferProcedureParams<TProcedure>['_input_in'];
88
+ undefined extends inferProcedureParams<TProcedure>['_input_in']
89
+ ? void | inferProcedureParams<TProcedure>['_input_in']
90
+ : inferProcedureParams<TProcedure>['_input_in'];
103
91
 
104
92
  export type inferProcedureParams<TProcedure> = TProcedure extends AnyProcedure
105
93
  ? TProcedure['_def']
@@ -5,7 +5,6 @@ import type {
5
5
  AnyProcedure,
6
6
  inferProcedureInput,
7
7
  inferTransformedProcedureOutput,
8
- ProcedureArgs,
9
8
  } from './procedure';
10
9
  import type { ProcedureCallOptions } from './procedureBuilder';
11
10
  import type { AnyRootConfig } from './rootConfig';
@@ -36,7 +35,7 @@ export type AnyRouterDef<TConfig extends AnyRootConfig = AnyRootConfig> =
36
35
  RouterDef<TConfig, any>;
37
36
 
38
37
  type DecorateProcedure<TProcedure extends AnyProcedure> = (
39
- input: ProcedureArgs<TProcedure['_def']>[0],
38
+ input: inferProcedureInput<TProcedure>,
40
39
  ) => Promise<TProcedure['_def']['_output_out']>;
41
40
 
42
41
  /**