import Say from 'say';
const say = new Say.Say('darwin' || 'win32' || 'linux');
// 默认输出
say.speak('Hello World!');
报错
'Say' does not exist on type 'Say'.
11 const say = new Say.Say('darwin' || 'win32' || 'linux');
~~~
[上午2:09:41] Found 1 error. Watching for file changes.
但是编译出来的文件,却能正常执行,就仅仅是typescript报一个这样的错。
包是 https://www.npmjs.com/package...
可以忽略掉这个错误:
也可以自己 declare module 给加上这个声明。