You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I import anything (like task: import { task } from '@trigger.dev/sdk/v3';) from the SDK, my Typescript compiler picks up errors in the SDK's Typedefs file ad node_modules/@trigger.dev/sdk/dist/v3/index.d.ts.
npx tsc -noEmit
node_modules/@trigger.dev/sdk/dist/v3/index.d.ts:173:40 - error TS2536: Type 'K' cannot be used to index type 'TRunHandle extends RunHandle<infer THandleOutput> ? Omit<{ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | ... 6 more ... | "EXPIRED"; ... 23 more ...; expiredAt?: Date | undefined; }, "output"> & { ...; } : Omit<...> & { ...; }'.
173 }) extends infer T ? { [K in keyof T]: (TRunHandle extends RunHandle<infer THandleOutput> ? Omit<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174 status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
270 output?: TRunHandle | undefined;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271 })[K]; } : never>;
~~~~~
node_modules/@trigger.dev/sdk/dist/v3/index.d.ts:898:63 - error TS2693: 'CreateEnvironmentVariableParams' only refers to a type, but is being used as a value here.
898 declare const envvars_CreateEnvironmentVariableParams: typeof CreateEnvironmentVariableParams;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@trigger.dev/sdk/dist/v3/index.d.ts:899:64 - error TS2693: 'ImportEnvironmentVariablesParams' only refers to a type, but is being used as a value here.
899 declare const envvars_ImportEnvironmentVariablesParams: typeof ImportEnvironmentVariablesParams;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 3 errors in the same file, starting at: node_modules/@trigger.dev/sdk/dist/v3/index.d.ts:173
Set up a Node project with the included Typescript config. Import something from the SDK.
Additional information
Additionally when importing from the SDK, my linter cannot resolve the module, even though Typescript can. I get around that by disabling a rule. I'm not sure if this is related to the main issue.
// eslint-disable-next-line import/no-unresolved
import { logger, task } from '@trigger.dev/sdk/v3';
Error: Unable to resolve path to module '@trigger.dev/sdk/v3'. eslint(import/no-unresolved)
The text was updated successfully, but these errors were encountered:
Provide environment information
System:
OS: macOS 12.7.5
CPU: (10) arm64 Apple M1 Pro
Memory: 75.05 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.7.0 - ~/.asdf/installs/nodejs/20.7.0/bin/node
Yarn: 1.22.19 - ~/.asdf/installs/nodejs/20.7.0/bin/yarn
npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
Describe the bug
Using version
"@trigger.dev/sdk": "3.0.0-beta.48"
When I import anything (like
task
:import { task } from '@trigger.dev/sdk/v3';
) from the SDK, my Typescript compiler picks up errors in the SDK's Typedefs file adnode_modules/@trigger.dev/sdk/dist/v3/index.d.ts
.Here's my Typescript configuration
Reproduction repo
To reproduce
Set up a Node project with the included Typescript config. Import something from the SDK.
Additional information
Additionally when importing from the SDK, my linter cannot resolve the module, even though Typescript can. I get around that by disabling a rule. I'm not sure if this is related to the main issue.
Error:
Unable to resolve path to module '@trigger.dev/sdk/v3'. eslint(import/no-unresolved)
The text was updated successfully, but these errors were encountered: