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
$keyof 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
Post a Comment