Fix build break caused by merge from master

This commit is contained in:
Paul van Brenk
2016-08-26 15:33:23 -07:00
parent 9a26da13c4
commit f931e606b1
2 changed files with 2 additions and 15 deletions

View File

@@ -292,19 +292,6 @@ namespace ts {
return true;
}
/**
* Returns the first element that matches the predicate, or undefined if none
* could be found.
*/
export function find<T>(array: T[], predicate: (item: T) => boolean): T {
for (let i = 0, len = array.length; i < len; i++) {
if (predicate(array[i])) {
return array[i];
}
}
return undefined;
}
/**
* Returns the last element of an array if non-empty, undefined otherwise.
*/

View File

@@ -14,7 +14,7 @@ namespace ts {
}
export namespace codefix {
const codeFixes: Map<CodeFix[]> = {};
const codeFixes = createMap<CodeFix[]>();
export function registerCodeFix(action: CodeFix) {
forEach(action.errorCodes, error => {
@@ -29,7 +29,7 @@ namespace ts {
export class CodeFixProvider {
public static getSupportedErrorCodes() {
return getKeys(codeFixes);
return Object.keys(codeFixes);
}
public getFixes(context: CodeFixContext): CodeAction[] {