提交 10bf4c62 编写于 作者: C Christof Marti

Try improve typing

上级 45e95305
......@@ -177,6 +177,8 @@ export interface IQuickInputButton {
export const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export interface IQuickInputService {
_serviceBrand: any;
......@@ -184,7 +186,9 @@ export interface IQuickInputService {
/**
* Opens the quick input box for selecting items and returns a promise with the user selected item(s) if any.
*/
pick<T extends IQuickPickItem, O extends IPickOptions<T>>(picks: TPromise<T[]> | T[], options?: O, token?: CancellationToken): TPromise<O extends { canPickMany: true } ? T[] : T>;
pick<T extends IQuickPickItem>(picks: TPromise<T[]> | T[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): TPromise<T[]>;
pick<T extends IQuickPickItem>(picks: TPromise<T[]> | T[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): TPromise<T>;
pick<T extends IQuickPickItem>(picks: TPromise<T[]> | T[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): TPromise<T>;
/**
* Opens the quick input box for text input and returns a promise with the user typed value if any.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册