已关闭
[问题咨询]: Implict export a wrong error reported #10076
fanglou创建于  5月25日关闭于  6月4日
fanglou
fanglou
5月25日 创建

感谢提出问题,我们将安排人答复!

问题描述

//  api.d.ets
declare namespace api {
    class A{}
}
export default api 


// test.ets 
import api from './api.d.ets'
interface I{}
export class C extends api.A implements I {

}

// expect OK ,but a wrong error is reported :Semantic error ESE1236581: Type 'Partial<A>' is not exported

likedislike
openharmony_ci
openharmony_ci成员
5月25日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@xucheng46](https://gitcode.com/xucheng46) [@trubachevilya](https://gitcode.com/trubachevilya) [@vpukhov](https://gitcode.com/vpukhov) [@chernykhsergey](https://gitcode.com/chernykhsergey) [@zhuoli](https://gitcode.com/zhuoli) [@Wangyuzhong11](https://gitcode.com/Wangyuzhong11) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
5月25日 添加了label:waiting_for_assign
fanglou
fanglou
5月25日 评论:

- ".*/@ohos\\.rpc\\.d\\.ets" in softlist should be right

likedislike
fangloufanglou
5月25日 修改标题为 “[问题咨询]: Implict export a wrong error reported”,原标题为“[问题咨询]: Implict export wrong error”
alexanderandreevmir
alexanderandreevmir
5月25日 评论:

Using a qualifiedName (api.A in this Case) for non-exported entity both inside and outside a namespace causes a compile-time error.
ArkTS Specification, Release 1.2.1-alpha TECHNICAL PREVIEW 10 - 13.3 Namespace Declarations.

likedislike
alexanderandreevmir
alexanderandreevmir
5月25日 评论:

There's also something like this in the Spec:

14.7 Ambient Namespace Declarations
Only exported entities can be accessed outside a namespace.

likedislike
alexanderandreevmir
alexanderandreevmir
5月25日 评论:

It seems that some clarifications regarding the Spec need to be made (for a start).

likedislike
fangloufanglou
5月29日 关联了pull request:Implict export a wrong error reported
openharmony_ciopenharmony_ci成员
6月4日 关闭了 issue
openharmony_ciopenharmony_ci成员
6月4日 issue状态由 意向 改变为 已完成