Skip to content

Commit 271eb54

Browse files
committed
Add type usages
1 parent be55feb commit 271eb54

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

references/v3-catalog/src/clientUsage.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
import { tasks, runs } from "@trigger.dev/sdk/v3";
1+
import { tasks, runs, TaskOutput, TaskPayload, TaskIdentifier } from "@trigger.dev/sdk/v3";
22
import { createJsonHeroDoc } from "./trigger/simple";
3+
import { TaskOutputHandle } from "@trigger.dev/sdk/v3/shared";
4+
5+
type createJsonHeroDocPayload = TaskPayload<typeof createJsonHeroDoc>; // retrieves the payload type of the task
6+
type createJsonHeroDocOutput = TaskOutput<typeof createJsonHeroDoc>; // retrieves the output type of the task
7+
type createJsonHeroDocIdentifier = TaskIdentifier<typeof createJsonHeroDoc>; // retrieves the identifier of the task
8+
type createJsonHeroDocHandle = TaskOutputHandle<typeof createJsonHeroDoc>; // retrieves the handle of the task
39

410
async function main() {
511
const anyHandle = await tasks.trigger("create-jsonhero-doc", {

0 commit comments

Comments
 (0)