File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1930,7 +1930,7 @@ namespace ts {
19301930 }
19311931
19321932 function createTypeofType() {
1933- return getUnionType(convertToArray (typeofEQFacts.keys(), getLiteralType));
1933+ return getUnionType(arrayFrom (typeofEQFacts.keys(), getLiteralType));
19341934 }
19351935
19361936 // A reserved member name starts with two underscores, but the third character cannot be an underscore
@@ -10531,12 +10531,8 @@ namespace ts {
1053110531 }
1053210532 }
1053310533
10534- function inferFromParameterTypes(source: Type, target: Type) {
10535- return inferFromTypes(source, target);
10536- }
10537-
1053810534 function inferFromSignature(source: Signature, target: Signature) {
10539- forEachMatchingParameterType(source, target, inferFromParameterTypes );
10535+ forEachMatchingParameterType(source, target, inferFromTypes );
1054010536
1054110537 if (source.typePredicate && target.typePredicate && source.typePredicate.kind === target.typePredicate.kind) {
1054210538 inferFromTypes(source.typePredicate.type, target.typePredicate.type);
Original file line number Diff line number Diff line change @@ -1290,7 +1290,7 @@ namespace ts {
12901290 case "object" :
12911291 return { } ;
12921292 default :
1293- return arrayFrom ( ( < CommandLineOptionOfCustomType > option ) . type . keys ( ) ) [ 0 ] ;
1293+ return ( option as CommandLineOptionOfCustomType ) . type . keys ( ) . next ( ) . value ;
12941294 }
12951295 }
12961296
Original file line number Diff line number Diff line change @@ -996,14 +996,6 @@ namespace ts {
996996 return result ;
997997 }
998998
999- export function convertToArray < T , U > ( iterator : Iterator < T > , f : ( value : T ) => U ) {
1000- const result : U [ ] = [ ] ;
1001- for ( let { value, done } = iterator . next ( ) ; ! done ; { value, done } = iterator . next ( ) ) {
1002- result . push ( f ( value ) ) ;
1003- }
1004- return result ;
1005- }
1006-
1007999 /**
10081000 * Calls `callback` for each entry in the map, returning the first truthy result.
10091001 * Use `map.forEach` instead for normal iteration.
@@ -2527,4 +2519,4 @@ namespace ts {
25272519 export function isCheckJsEnabledForFile ( sourceFile : SourceFile , compilerOptions : CompilerOptions ) {
25282520 return sourceFile . checkJsDirective ? sourceFile . checkJsDirective . enabled : compilerOptions . checkJs ;
25292521 }
2530- }
2522+ }
You can’t perform that action at this time.
0 commit comments