已关闭
[问题咨询]: declare interface method default and undefault mix #9694
fanglou创建于  3月31日关闭于  4月3日
fanglou
fanglou
3月31日 创建

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

问题描述

// api1.d.ets
export declare interface I {
   foo1():void
   default foo2(s: string): string;
}

// api1.ets
export interface I {
   foo1():void
   foo2(s: string): string {
   	return s;
   }
}

// index.ets
import { I } from './api1.d.ets'

let i : I =  {foo1(){}}; // expect OK
likedislike
fangloufanglou
3月31日 添加了label:question
openharmony_ci
openharmony_ci成员
3月31日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@xucheng46](https://gitcode.com/xucheng46) [@gavin1012_hw](https://gitcode.com/gavin1012_hw) [@trubachevilya](https://gitcode.com/trubachevilya) [@vpukhov](https://gitcode.com/vpukhov) [@chernykhsergey](https://gitcode.com/chernykhsergey) [@zhuoli](https://gitcode.com/zhuoli) 。如果需要调整订阅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成员
3月31日 添加了label:waiting_for_assign
fangloufanglou
3月31日 修改了issue 的描述
fangloufanglou
3月31日 关联了pull request:Declare interface method has body_2
openharmony_ciopenharmony_ci成员
4月3日 关闭了 issue
openharmony_ciopenharmony_ci成员
4月3日 issue状态由 意向 改变为 已完成