Scheduled Task payload types
Does this plugin support adding type for the payload? Tried to just add interface in tried to search docs for that but I didn't find anything about that
re-read docs and found that they actually mention ability to specify type for payload. but somehow that doesn't work for me. Tried passing just raw type, interface, actual type and still no success
the way I declare task & it's payload:
d.ts
as type for that key but that doesn't work. 11 Replies
also small question. if task fails during it's execution does plugin automatically re-run it with some delay or we need to manually execute it after catching error with try catch {} for example :Hmm:
that is all handled by the underlying library that we use bullmq. Not sure how they handle it.
I see :okie:
@secre
hi
since you didn't typed it yet
you add augmentation to .d.ts file just like you did
with type you want
Solution
that's how you do it
oh, so you need to specify generic for that to work
:WAHHHHHHHHHHHHH:
yes
it should be required
that generic is optional
idk why
I think thats because you rarely have tasks that require payload
yeah and default is never
ye