When dereferencing an argument within a function call like this:
worker.onmessage = ({ data }) =>
Is there a way to include typing information?
For example in this case the dereferenced data object is a ParseResult. Can we include that somehow within the dereferencing syntax?
The end goal is to get autocomplete working within the function.
I could do something like:
const result:ParseResult = data
But I'm curious as to whether there is a shorter more sugared approach?