From 3681b39ae637e5f814ad97e4d96a9914f28ca3e7 Mon Sep 17 00:00:00 2001 From: Ankcorn Date: Mon, 12 Feb 2024 14:26:03 +0000 Subject: [PATCH] fix build --- .github/workflows/publish.yml | 1 + CHANGELOG.md | 3 +++ package.json | 1 + src/trpc.ts | 4 ++-- tsconfig.json | 1 - 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc5552a..10f3acf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,6 +28,7 @@ jobs: run: npm ci && npm run build && + npm run check && npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc78ef..9180e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] +* fix ts error in build + ## [0.3.3] - 2024-02-12 * support trpc v11 diff --git a/package.json b/package.json index 11c5274..7548233 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "vitest": "^0.34.6" }, "scripts": { + "check": "tsc --noEmit", "build": "tsup", "test": "vitest", "release": "release-it" diff --git a/src/trpc.ts b/src/trpc.ts index 0216c29..ae6a94f 100644 --- a/src/trpc.ts +++ b/src/trpc.ts @@ -24,8 +24,8 @@ export function tracing(options?: TracingOptions) { const result = await opts.next(); // opts.rawInput is for v10, `opts.getRawInput` is for v11 - const rawInput = - "rawInput" in opts ? opts.rawInput : await opts.getRawInput(); + // @ts-expect-error + const rawInput = "rawInput" in opts ? opts.rawInput : await opts.getRawInput(); if (options.collectInput && typeof rawInput === "object") { span.setAttributes(flatten({ input: rawInput })) } diff --git a/tsconfig.json b/tsconfig.json index bdfa897..4444f2c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "module": "nodenext", "allowImportingTsExtensions": true, - "emitDeclarationOnly": true, "declaration": true, "moduleResolution": "nodenext", "noImplicitAny": true,