-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
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
模块暴露出错 #30
Comments
碰到了同样的问题,非常奇葩 |
这里是用 @alicloud/green20220302 发现的 |
@alicloud/dysmsapi20170525 也有这个问题
暂时这样解决的 import dysmsapi from '@alicloud/dysmsapi20170525'
// @ts-ignore
const Client = dysmsapi.default as typeof dysmsapi
const client = new Client() |
反馈了 但是官方没有积极去修改 后面通过@ts-ignore忽略掉ts类型 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
源码暴露使用 exports.default = Client;
导入的时候使用 import alimt20181012, * as $alimt20181012 from '@alicloud/alimt20181012';
然后案例中把alimt20181012当成类去使用,但是它实际上是一个模块对象,alimt20181012.default才是真正的类,现在问题就是typescript识别不到alimt20181012.default,它把alimt20181012当成了类。
The text was updated successfully, but these errors were encountered: