diff --git a/.changeset/light-donkeys-retire.md b/.changeset/light-donkeys-retire.md new file mode 100644 index 0000000000..6985bee16e --- /dev/null +++ b/.changeset/light-donkeys-retire.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/sdk": patch +--- + +fix(sdk): Re-export schemaTask types to prevent the TypeScript error TS2742: The inferred type of 'task' cannot be named without a reference to '@trigger.dev/core/v3'. This is likely not portable. diff --git a/packages/trigger-sdk/src/v3/shared.ts b/packages/trigger-sdk/src/v3/shared.ts index 0990a04ce9..6e2ffbdee2 100644 --- a/packages/trigger-sdk/src/v3/shared.ts +++ b/packages/trigger-sdk/src/v3/shared.ts @@ -28,7 +28,6 @@ import { TaskRunExecutionResult, TaskRunPromise, } from "@trigger.dev/core/v3"; -import { PollOptions, runs } from "./runs.js"; import { tracer } from "./tracer.js"; import type { @@ -115,6 +114,10 @@ export type { TaskPayload, TaskRunResult, TriggerOptions, + TaskWithSchema, + TaskWithSchemaOptions, + TaskSchema, + TaskOptionsWithSchema, }; export { SubtaskUnwrapError, TaskRunPromise }; diff --git a/packages/trigger-sdk/src/v3/tasks.ts b/packages/trigger-sdk/src/v3/tasks.ts index c8b3fbd4fe..75b7e85e62 100644 --- a/packages/trigger-sdk/src/v3/tasks.ts +++ b/packages/trigger-sdk/src/v3/tasks.ts @@ -39,6 +39,10 @@ import type { TriggerOptions, TaskRunResult, TaskFromIdentifier, + TaskWithSchemaOptions, + TaskSchema, + TaskWithSchema, + TaskOptionsWithSchema, } from "./shared.js"; export type { @@ -56,6 +60,10 @@ export type { TriggerOptions, TaskRunResult, TaskFromIdentifier, + TaskWithSchemaOptions, + TaskSchema, + TaskWithSchema, + TaskOptionsWithSchema, }; export type * from "./hooks.js";