You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After setting up the handlers, I realize the job.data arrives untyped. This objects are instantiated from classes, so private members become public and functions undefined.
How to reproduce.
add a job with a custom object.
Relevant log output
job.data.getTimestamp is not a function
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
I solved it temporally with a static variable to re-instantiate the object, although this misses the entire point of using .
*I really wish there would be a workaround for this. (nothing to find at the docs)
TypeScript:
static serializeMessage(unserializedMessage: any): Message {
return new Message(
unserializedMessage.token,
unserializedMessage.emitter_name,
unserializedMessage.msg,
unserializedMessage.delay,
unserializedMessage.timestamp,
unserializedMessage.attachments,
);
}
Version
v.5.7.4
Platform
NodeJS
What happened?
After setting up the handlers, I realize the job.data arrives untyped. This objects are instantiated from classes, so private members become public and functions undefined.
How to reproduce.
add a job with a custom object.
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: