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
Though this works, it is problematic because only certain basic data types can be sent to a worker via posting a message. Because the type is any, it does not prevent runtime errors caused by passing in things like functions or random class instances into these functions and expecting it to work.
The TaskFunction type should only accept certain acceptable data types that workers can receive, along with functions like parent.sendMessage or messenger.sendMessage. It must be strict.
The text was updated successfully, but these errors were encountered:
Currently, the type definition for
TaskFunction
looks like this:Though this works, it is problematic because only certain basic data types can be sent to a worker via posting a message. Because the type is
any
, it does not prevent runtime errors caused by passing in things like functions or random class instances into these functions and expecting it to work.The
TaskFunction
type should only accept certain acceptable data types that workers can receive, along with functions likeparent.sendMessage
ormessenger.sendMessage
. It must be strict.The text was updated successfully, but these errors were encountered: