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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -