File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,19 +292,6 @@ namespace ts {
292292 return true ;
293293 }
294294
295- /**
296- * Returns the first element that matches the predicate, or undefined if none
297- * could be found.
298- */
299- export function find < T > ( array : T [ ] , predicate : ( item : T ) => boolean ) : T {
300- for ( let i = 0 , len = array . length ; i < len ; i ++ ) {
301- if ( predicate ( array [ i ] ) ) {
302- return array [ i ] ;
303- }
304- }
305- return undefined ;
306- }
307-
308295 /**
309296 * Returns the last element of an array if non-empty, undefined otherwise.
310297 */
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace ts {
1414 }
1515
1616 export namespace codefix {
17- const codeFixes : Map < CodeFix [ ] > = { } ;
17+ const codeFixes = createMap < CodeFix [ ] > ( ) ;
1818
1919 export function registerCodeFix ( action : CodeFix ) {
2020 forEach ( action . errorCodes , error => {
@@ -29,7 +29,7 @@ namespace ts {
2929
3030 export class CodeFixProvider {
3131 public static getSupportedErrorCodes ( ) {
32- return getKeys ( codeFixes ) ;
32+ return Object . keys ( codeFixes ) ;
3333 }
3434
3535 public getFixes ( context : CodeFixContext ) : CodeAction [ ] {
You can’t perform that action at this time.
0 commit comments