本文整理汇总了TypeScript中vs/base/parts/ipc/node/ipc.IChannel类的典型用法代码示例。如果您正苦于以下问题:TypeScript IChannel类的具体用法?TypeScript IChannel怎么用?TypeScript IChannel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IChannel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
writeInTerminal(selector: string, text: string): Promise<void> {
return this.channel.call('writeInTerminal', [selector, text]);
}
示例2:
getInstalled(type: LocalExtensionType | null = null): Promise<ILocalExtension[]> {
return Promise.resolve(this.channel.call<ILocalExtension[]>('getInstalled', [type]))
.then(extensions => extensions.map(extension => this._transformIncoming(extension)));
}
示例3:
getLanguageIds(type?: LanguageType): Thenable<string[]> {
return this.channel.call('getLanguageIds', type);
}
示例4:
log(eventName: string, data?: any): any {
this.channel.call('log', { eventName, data })
.then(undefined, err => `Failed to log telemetry: ${console.warn(err)}`);
return Promise.resolve(null);
}