diff --git a/lib/index.ts b/lib/index.ts index 72a34f6..452abc1 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -25,6 +25,7 @@ import type { InferParamsInFromBlock, InferBlock, InferHttpBlock, + InferResultOrResult, } from './types'; import type BaseBlock from './block'; import type { DescriptHttpBlockDescription, DescriptHttpBlockQuery, DescriptHttpBlockQueryValue } from './httpBlock'; @@ -160,7 +161,7 @@ const run = function< // block: FunctionBlock, { params, context, cancel }: { params?: Params; context?: Context; cancel?: Cancel; - } = {}) { + } = {}): Promise> { const runContext = new RunContext(); if (!(params && typeof params === 'object')) { diff --git a/package.json b/package.json index 973a979..225a2d4 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "eslint": "npx eslint .", "test": "cd tests && ./gen-certs.sh && npx vitest", "ts-compile": "npx tsc --noEmit", - "prepack": "rm -rf build && npx tsc -p ./tsconfig-build.json && npx ts-add-js-extension --dir=build" + "prepack": "rm -rf build && npx tsc -p ./tsconfig-build.json && npx ts-add-js-extension --dir=build && npx tsc -p ./tsconfig-build.json -d" }, "devDependencies": { "@eslint/js": "^9.21.0", diff --git a/tsconfig.json b/tsconfig.json index 0d0b3f5..7d7bd47 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ "skipLibCheck": true, // https://www.typescriptlang.org/tsconfig#skipLibCheck "strict": false, "strictNullChecks": true, - "declaration":true, + "declaration":false, "baseUrl": ".", "outDir": "./build"