Changeset View
Changeset View
Standalone View
Standalone View
web/types/worker-types.js
- This file was added.
// @flow | |||||
export type SharedWorkerMessageEvent = MessageEvent & { | |||||
+ports: $ReadOnlyArray<MessagePort>, | |||||
}; | |||||
ashoat: I'm surprised this type works... the second part of the union is an object that contains only… | |||||
kamilAuthorUnsubmitted Done Inline ActionsI think it works because of problems with how SharedWorkers are typed in the flow, but you're right - this shouldn't work. I'll make this type inexact as you suggested kamil: I think it works because of problems with how `SharedWorkers` are typed in the flow, but you're… |
I'm surprised this type works... the second part of the union is an object that contains only only property (props), so it is likely incompatible with MessageEvent. Does my inline edit work? Or perhaps even better (but less likely to work):