Skip to content

Commit

Permalink
Make only a CodeActionKind[]
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed May 22, 2018
1 parent 343ae12 commit 643ef2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions types/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ export interface CodeActionContext {
* Actions not of this kind are filtered out by the client before being shown. So servers
* can omit computing them.
*/
only?: CodeActionKind
only?: CodeActionKind[];
}

/**
Expand All @@ -1454,7 +1454,7 @@ export namespace CodeActionContext {
/**
* Creates a new CodeActionContext literal.
*/
export function create(diagnostics: Diagnostic[], only?: CodeActionKind): CodeActionContext {
export function create(diagnostics: Diagnostic[], only?: CodeActionKind[]): CodeActionContext {
let result: CodeActionContext = { diagnostics };
if (only !== void 0 && only !== null) {
result.only = only;
Expand All @@ -1466,7 +1466,7 @@ export namespace CodeActionContext {
*/
export function is(value: any): value is CodeActionContext {
let candidate = value as CodeActionContext;
return Is.defined(candidate) && Is.typedArray<Diagnostic[]>(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.string(candidate.only));
return Is.defined(candidate) && Is.typedArray<Diagnostic[]>(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
}
}

Expand Down

0 comments on commit 643ef2c

Please sign in to comment.