ak1394/react-native-tts

"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

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

I think the fix is changing the code to:

declare const Tts: ReactNativeTts;

Thanks! It should be fixed in 4.0.0 release.