Describe the bug
Just giving a copy and paste in the code in the cods using the hook useMMKVStorage()
1° - const MMKV: MMKVStorage.API = new MMKVLoader().initialize()
TS say: 'MMKVStorage' refers to a value, but is being used as a type here. Did you mean 'typeof MMKVStorage'
but using typeof MMKVStorage.API this returns error
2° - const [value, setValue] = useStorage(' ') - When i press CTRL+SPACE, to see the options, this returns nothing
Hacks
When i just use ----> key: 'clientList' | 'totalDay' | 'totalMonth' ------ Without the LiteralUnion the TS returns my 3 options
Screenshots
THIS WORKS
FIX
Doing this, will work, but keeping the (U =string), if i put any string inside my hook this wont send error because U accepts string too.
Describe the bug Just giving a copy and paste in the code in the cods using the hook useMMKVStorage() 1° - const MMKV: MMKVStorage.API = new MMKVLoader().initialize() TS say: 'MMKVStorage' refers to a value, but is being used as a type here. Did you mean 'typeof MMKVStorage' but using typeof MMKVStorage.API this returns error 2° - const [value, setValue] = useStorage(' ') - When i press CTRL+SPACE, to see the options, this returns nothing
Hacks When i just use ----> key: 'clientList' | 'totalDay' | 'totalMonth' ------ Without the LiteralUnion the TS returns my 3 options
Screenshots
THIS WORKS
FIX Doing this, will work, but keeping the (U =string), if i put any string inside my hook this wont send error because U accepts string too.
Platform Information: