@@ -31,7 +31,7 @@ function predicate( i: number ): boolean {
31
31
/**
32
32
* Empty function.
33
33
*/
34
- function noop ( ) {
34
+ function noop ( ) : void {
35
35
// Body is empty...
36
36
}
37
37
@@ -40,32 +40,32 @@ function noop() {
40
40
41
41
// The function does not return a value...
42
42
{
43
- until ( noop , predicate ) ; // $ExpectType void
44
- until ( noop , predicate , { } ) ; // $ExpectType void
43
+ until ( predicate , noop ) ; // $ExpectType void
44
+ until ( predicate , noop , { } ) ; // $ExpectType void
45
45
}
46
46
47
47
// The compiler throws an error if the function is provided a first argument which is not a function...
48
48
{
49
- until ( 'abc' , predicate ) ; // $ExpectError
50
- until ( 5 , predicate ) ; // $ExpectError
51
- until ( true , predicate ) ; // $ExpectError
52
- until ( false , predicate ) ; // $ExpectError
53
- until ( [ ] , predicate ) ; // $ExpectError
54
- until ( { } , predicate ) ; // $ExpectError
49
+ until ( 'abc' , noop ) ; // $ExpectError
50
+ until ( 5 , noop ) ; // $ExpectError
51
+ until ( true , noop ) ; // $ExpectError
52
+ until ( false , noop ) ; // $ExpectError
53
+ until ( [ ] , noop ) ; // $ExpectError
54
+ until ( { } , noop ) ; // $ExpectError
55
55
}
56
56
57
57
// The compiler throws an error if the function is provided a second argument which is not a function...
58
58
{
59
- until ( noop , 'abc' ) ; // $ExpectError
60
- until ( noop , 5 ) ; // $ExpectError
61
- until ( noop , true ) ; // $ExpectError
62
- until ( noop , false ) ; // $ExpectError
63
- until ( noop , [ ] ) ; // $ExpectError
64
- until ( noop , { } ) ; // $ExpectError
59
+ until ( predicate , 'abc' ) ; // $ExpectError
60
+ until ( predicate , 5 ) ; // $ExpectError
61
+ until ( predicate , true ) ; // $ExpectError
62
+ until ( predicate , false ) ; // $ExpectError
63
+ until ( predicate , [ ] ) ; // $ExpectError
64
+ until ( predicate , { } ) ; // $ExpectError
65
65
}
66
66
67
67
// The compiler throws an error if the function is provided fewer than two arguments...
68
68
{
69
69
until ( ) ; // $ExpectError
70
- until ( noop ) ; // $ExpectError
70
+ until ( predicate ) ; // $ExpectError
71
71
}
0 commit comments