javascript - What is the correct flow type for window object? -


i need pass in window root of application, , i'm confused flow type should using.

i tried

export default class listattribute extends component {   props: {    framewindow: mixed   }   componentdidmount() {     this.props.framewindow.addeventlistener('click', this.closelist, false)    }   .... } 

this gives me call of method addeventlistener. method cannot called on mixed, tried refinement no luck.

i tried looking here, couldn't find bom itself. https://www.saltycrane.com/flow-type-cheat-sheet/latest/#lib/bom.js

there isn't typings window object seems. now, looks type of any used.


Comments