From 7551b1b0ca7ac75bf3358056acff5c233beb7b18 Mon Sep 17 00:00:00 2001 From: Greg McKelvey Date: Mon, 16 Oct 2023 14:32:08 -0700 Subject: [PATCH] fix: update @trpc/server imports to use dist TRPC ships with its src ts files and these sneaky imports were accidentally targeting that ts, and not the dist files, making it so the whole trpc lib was getting checked by the consumers tsc build! In particular, this surfaced for me because my project has verbatimModuleSyntax set to true, and trpc does not lean on that option. --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 71cec3ee..37a0e31a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,7 @@ import { Procedure, ProcedureParams, Router } from '@trpc/server'; import type { RootConfig } from '@trpc/server/dist/core/internals/config'; -import { TRPC_ERROR_CODE_KEY } from '@trpc/server/rpc'; -import type { RouterDef } from '@trpc/server/src/core/router'; +import type { RouterDef } from '@trpc/server/dist/core/router'; +import { TRPC_ERROR_CODE_KEY } from '@trpc/server/dist/rpc'; import { OpenAPIV3 } from 'openapi-types'; import { ZodIssue } from 'zod';