"declare const Tts = new ReactNativeTts()" gives TypeScript error "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."
ngocdaothanh opened this issue · 2 comments
ngocdaothanh commented
Line 80 of https://github.com/ak1394/react-native-tts/blob/master/index.d.ts
declare const Tts = new ReactNativeTts();
gives error:
A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
TypeScript: 4.2.2
ngocdaothanh commented
I think the fix is changing the code to:
declare const Tts: ReactNativeTts;
ak1394 commented
Thanks! It should be fixed in 4.0.0 release.