diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/index.ts index d75922592..b91320a24 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/index.ts @@ -1,5 +1,5 @@ export * from './constants'; -// export * from './instructions'; +export type * from './instructions'; export { Trigger } from './triggers'; export { default as Processor } from './Processor'; export { default } from './Plugin'; diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts index c1add7a64..b8cfcefdd 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/index.ts @@ -7,13 +7,13 @@ import Processor from '../Processor'; import type { FlowNodeModel } from '../types'; -export type Job = { +export interface IJob { status: number; result?: unknown; [key: string]: unknown; -} | null; +} -export type InstructionResult = Job | Promise; +export type InstructionResult = IJob | Promise | null; export type Runner = (node: FlowNodeModel, input: any, processor: Processor) => InstructionResult;