File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
references/v3-catalog/src/trigger Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { task } from "@trigger.dev/sdk/v3" ;
2
+
3
+ export const returnString = task ( {
4
+ id : "return-string" ,
5
+ run : async ( ) => {
6
+ return "This is a string" ;
7
+ } ,
8
+ } ) ;
9
+
10
+ export const returnNumber = task ( {
11
+ id : "return-number" ,
12
+ run : async ( ) => {
13
+ return 42 ;
14
+ } ,
15
+ } ) ;
16
+
17
+ export const returnTrue = task ( {
18
+ id : "return-true" ,
19
+ run : async ( ) => {
20
+ return true ;
21
+ } ,
22
+ } ) ;
23
+
24
+ export const returnFalse = task ( {
25
+ id : "return-false" ,
26
+ run : async ( ) => {
27
+ return false ;
28
+ } ,
29
+ } ) ;
30
+
31
+ export const returnNull = task ( {
32
+ id : "return-null" ,
33
+ run : async ( ) => {
34
+ return null ;
35
+ } ,
36
+ } ) ;
37
+
38
+ export const returnUndefined = task ( {
39
+ id : "return-undefined" ,
40
+ run : async ( ) => {
41
+ return undefined ;
42
+ } ,
43
+ } ) ;
44
+
45
+ export const returnObject = task ( {
46
+ id : "return-object" ,
47
+ run : async ( ) => {
48
+ return { key : "value" } ;
49
+ } ,
50
+ } ) ;
51
+
52
+ export const returnArray = task ( {
53
+ id : "return-array" ,
54
+ run : async ( ) => {
55
+ return [ 1 , 2 , 3 ] ;
56
+ } ,
57
+ } ) ;
You can’t perform that action at this time.
0 commit comments