File tree Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -1930,7 +1930,7 @@ namespace ts {
1930
1930
}
1931
1931
1932
1932
function createTypeofType() {
1933
- return getUnionType(convertToArray (typeofEQFacts.keys(), getLiteralType));
1933
+ return getUnionType(arrayFrom (typeofEQFacts.keys(), getLiteralType));
1934
1934
}
1935
1935
1936
1936
// A reserved member name starts with two underscores, but the third character cannot be an underscore
@@ -10531,12 +10531,8 @@ namespace ts {
10531
10531
}
10532
10532
}
10533
10533
10534
- function inferFromParameterTypes(source: Type, target: Type) {
10535
- return inferFromTypes(source, target);
10536
- }
10537
-
10538
10534
function inferFromSignature(source: Signature, target: Signature) {
10539
- forEachMatchingParameterType(source, target, inferFromParameterTypes );
10535
+ forEachMatchingParameterType(source, target, inferFromTypes );
10540
10536
10541
10537
if (source.typePredicate && target.typePredicate && source.typePredicate.kind === target.typePredicate.kind) {
10542
10538
inferFromTypes(source.typePredicate.type, target.typePredicate.type);
Original file line number Diff line number Diff line change @@ -1290,7 +1290,7 @@ namespace ts {
1290
1290
case "object" :
1291
1291
return { } ;
1292
1292
default :
1293
- return arrayFrom ( ( < CommandLineOptionOfCustomType > option ) . type . keys ( ) ) [ 0 ] ;
1293
+ return ( option as CommandLineOptionOfCustomType ) . type . keys ( ) . next ( ) . value ;
1294
1294
}
1295
1295
}
1296
1296
Original file line number Diff line number Diff line change @@ -996,14 +996,6 @@ namespace ts {
996
996
return result ;
997
997
}
998
998
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
-
1007
999
/**
1008
1000
* Calls `callback` for each entry in the map, returning the first truthy result.
1009
1001
* Use `map.forEach` instead for normal iteration.
@@ -2527,4 +2519,4 @@ namespace ts {
2527
2519
export function isCheckJsEnabledForFile ( sourceFile : SourceFile , compilerOptions : CompilerOptions ) {
2528
2520
return sourceFile . checkJsDirective ? sourceFile . checkJsDirective . enabled : compilerOptions . checkJs ;
2529
2521
}
2530
- }
2522
+ }
You can’t perform that action at this time.
0 commit comments