mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Fix build break caused by merge from master
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user