javascript - Basic example of how to use ImmutableJS Records with Flow -


in following example, i'd expect every .get() , .set() call have flow error, couple do:

const abrecord = record({ a: 1, b: 2 }); const myrecord = abrecord({ b: 3 });  const c = myrecord.get("c");            // error const d: string = myrecord.get("a");    // no error myrecord.set("c", 4);                   // error myrecord.set("a", "a string");          // no error 

am missing annotations solve this?


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -