Skip to main content

Allow run property to return a sync response

Right now, the run property is only valid if it returns a promise

1 comment

Comments1

  • mattaitken

    Team•

    Aug 6, 2024

    You can add the `async` label to the run function and then just return things:

    export const immediateReturn = task({
      id: "immediateReturn",
      run: async (payload) => {
        return {
          foo: "bar",
        }
      },
    });


    Does this not work your use case?