Factory takes [[ErrorCtor, TRPC_CODE], ...] tuples and returns a tRPC middleware that translates matching domain errors to TRPCError. Discrim- inates by instanceof; preserves original error as cause; unmapped errors propagate (tRPC then wraps them as INTERNAL_SERVER_ERROR with the original error as .cause — middleware does not interfere). core-shared never enumerates feature errors — each feature passes its own constructors in via integrations/api/procedures.ts (Tasks 3-7). Also exports the `t` instance from trpc/init.ts so feature procedure files can do t.procedure.use(...). Also fixes tsconfig.json: rootDir set to "." and @/* path alias added so test files using @/ resolve correctly under tsc --noEmit. Refactor log: §1, §2, §4 Spec: R13–R17
Description
No description provided
Languages
TypeScript
65.6%
JavaScript
21.1%
Handlebars
12.2%
Shell
0.9%
Dockerfile
0.1%