fix(sdk): Re-export schemaTask types to prevent the TypeScript error TS2742 (#2735)
Fixes this type of error when exporting a `schemaTask` in a monorepo: ``` error TS2742: The inferred type of 'helloWorldSchema' cannot be named without a reference to '@trigger.dev/core/v3'. This is likely not portable. ```
This commit is contained in:
@@ -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.
|
||||
@@ -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 };
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user