flowtype - Indexable signature not found in object literal in Flow -


i have interface:

interface iformdata {     [string]: string };  export type { iformdata }; 

it's simple interface accepts key-value string. when use this,

const formdata:iformdata = { email: '...', password: '...' }; 

it gives me error:

[flow] property $key of iformdata (indexable signature not found in object literal)

i tried this, gives me same error:

var formdata: iformdata;    // error formdata['email'] = ...; formdata['password'] = ...; 

i searched on google 2 days, still stuck in here , need help!

any advice appreciate it.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -