相关疑难解决方法(0)

如何在省略一些其他可选参数的同时在TypeScript中传递可选参数?

鉴于以下签名:

export interface INotificationService {
    error(message: string, title?: string, autoHideAfter?: number);
}
Run Code Online (Sandbox Code Playgroud)

如何调用函数error()而不指定title参数,但将autoHideAfter设置为1000?

typescript

238
推荐指数
6
解决办法
21万
查看次数

标签 统计

typescript ×1