We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
文档里给出的是 const jinrishici = require('jinrishici'); 如果使用 import { jinrishici } from 'jinrishici'; 则会报错。 这里有两个坑,1个是目前没有ts的类型包,另外一个是包里导出的是 load 函数。 对于第一个问题,在项目根目录里创建 jinrishici.d.ts 文件,简单内容为 declare module 'jinrishici'; 并在 tsconfig.json 中的 "include":[],数组中添加 "jinrishici.d.ts", 如 "include": ["src","jinrishici.d.ts"] ,即可。 对于第二个问题,修改为 import { load } from 'jinrishici'; 就可以使用了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
文档里给出的是 const jinrishici = require('jinrishici');
如果使用 import { jinrishici } from 'jinrishici'; 则会报错。
这里有两个坑,1个是目前没有ts的类型包,另外一个是包里导出的是 load 函数。
对于第一个问题,在项目根目录里创建 jinrishici.d.ts 文件,简单内容为 declare module 'jinrishici'; 并在 tsconfig.json 中的 "include":[],数组中添加 "jinrishici.d.ts", 如 "include": ["src","jinrishici.d.ts"] ,即可。
对于第二个问题,修改为 import { load } from 'jinrishici'; 就可以使用了。
The text was updated successfully, but these errors were encountered: