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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -