flowtype - Is there any way to type Immutable Map of another type? -


eg. have type external library (mapboxgl.style) , want create new immutable.map type based on type.

so type cover internal properties of original type within immutable.map.

here code:

const plainstyle: mapboxgl.style = <...>; const style: ??? = immutable.map(plainstyle);  style.get('name'): string style.get('sources'): immutable.map<string, object> 

it sounds fromjs trick.

something like:

const style = immutable.fromjs(plainstyle) 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -