@@ -13,16 +13,37 @@ expectError(findUp(['rainbow.png', 'unicorn.png'], {concurrency: 1}))
13
13
14
14
expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' ) ) ;
15
15
expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' , { cwd : '' } ) ) ;
16
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' , { allowSymlinks : true } ) ) ;
17
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' , { allowSymlinks : false } ) ) ;
18
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' , { type : 'file' } ) ) ;
19
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => 'unicorn.png' , { type : 'directory' } ) ) ;
16
20
expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined ) ) ;
17
21
expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined , { cwd : '' } ) ) ;
22
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined , { allowSymlinks : true } ) ) ;
23
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined , { allowSymlinks : false } ) ) ;
24
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined , { type : 'file' } ) ) ;
25
+ expectType < Promise < string | undefined > > ( findUp ( ( ) => undefined , { type : 'directory' } ) ) ;
18
26
expectType < Promise < string | undefined > > ( findUp ( ( ) : findUp . StopSymbol => findUp . stop ) ) ;
19
27
expectType < Promise < string | undefined > > ( findUp ( ( ) : findUp . StopSymbol => findUp . stop , { cwd : '' } ) ) ;
20
28
expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' ) ) ;
21
29
expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' , { cwd : '' } ) ) ;
30
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' , { allowSymlinks : true } ) ) ;
31
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' , { allowSymlinks : false } ) ) ;
32
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' , { type : 'file' } ) ) ;
33
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => 'unicorn.png' , { type : 'directory' } ) ) ;
22
34
expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined ) ) ;
23
35
expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined , { cwd : '' } ) ) ;
36
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined , { allowSymlinks : true } ) ) ;
37
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined , { allowSymlinks : false } ) ) ;
38
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined , { type : 'file' } ) ) ;
39
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) => undefined , { type : 'directory' } ) ) ;
40
+
24
41
expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop ) ) ;
25
42
expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop , { cwd : '' } ) ) ;
43
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop , { allowSymlinks : true } ) ) ;
44
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop , { allowSymlinks : false } ) ) ;
45
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop , { type : 'file' } ) ) ;
46
+ expectType < Promise < string | undefined > > ( findUp ( async ( ) : Promise < findUp . StopSymbol > => findUp . stop , { type : 'directory' } ) ) ;
26
47
27
48
expectType < string | undefined > ( findUp . sync ( 'unicorn.png' ) ) ;
28
49
expectType < string | undefined > ( findUp . sync ( 'unicorn.png' , { cwd : '' } ) ) ;
@@ -35,9 +56,19 @@ expectType<string | undefined>(findUp.sync(['rainbow.png', 'unicorn.png'], {type
35
56
36
57
expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' ) ) ;
37
58
expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' , { cwd : '' } ) ) ;
59
+ expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' , { allowSymlinks : true } ) ) ;
60
+ expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' , { allowSymlinks : false } ) ) ;
61
+ expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' , { type : 'file' } ) ) ;
62
+ expectType < string | undefined > ( findUp . sync ( ( ) => 'unicorn.png' , { type : 'directory' } ) ) ;
38
63
expectType < string | undefined > ( findUp . sync ( ( ) => undefined ) ) ;
39
64
expectType < string | undefined > ( findUp . sync ( ( ) => undefined , { cwd : '' } ) ) ;
65
+ expectType < string | undefined > ( findUp . sync ( ( ) => undefined , { allowSymlinks : true } ) ) ;
66
+ expectType < string | undefined > ( findUp . sync ( ( ) => undefined , { allowSymlinks : false } ) ) ;
67
+ expectType < string | undefined > ( findUp . sync ( ( ) => undefined , { type : 'file' } ) ) ;
68
+ expectType < string | undefined > ( findUp . sync ( ( ) => undefined , { type : 'directory' } ) ) ;
40
69
expectType < string | undefined > ( findUp . sync ( ( ) : findUp . StopSymbol => findUp . stop ) ) ;
41
70
expectType < string | undefined > ( findUp . sync ( ( ) : findUp . StopSymbol => findUp . stop , { cwd : '' } ) ) ;
71
+ expectType < string | undefined > ( findUp . sync ( ( ) : findUp . StopSymbol => findUp . stop , { type : 'file' } ) ) ;
72
+ expectType < string | undefined > ( findUp . sync ( ( ) : findUp . StopSymbol => findUp . stop , { type : 'directory' } ) ) ;
42
73
43
74
expectType < Symbol > ( findUp . stop ) ;
0 commit comments