File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ console.log(await packageDirectory());
30
30
//=> '/Users/sindresorhus/foo'
31
31
```
32
32
*/
33
- export function packageDirectory ( options ?: Options ) : Promise < string > ;
33
+ export function packageDirectory ( options ?: Options ) : Promise < string | undefined > ;
34
34
35
35
/**
36
36
Synchronously find the root directory of a Node.js project or npm package.
@@ -55,4 +55,4 @@ console.log(packageDirectorySync());
55
55
//=> '/Users/sindresorhus/foo'
56
56
```
57
57
*/
58
- export function packageDirectorySync ( options ?: Options ) : string ;
58
+ export function packageDirectorySync ( options ?: Options ) : string | undefined ;
Original file line number Diff line number Diff line change 1
1
import { expectType } from 'tsd' ;
2
2
import { packageDirectory , packageDirectorySync } from './index.js' ;
3
3
4
- expectType < Promise < string > > ( packageDirectory ( { cwd : '/Users/project/pkg-dir' } ) ) ;
5
- expectType < string > ( packageDirectorySync ( { cwd : '/Users/project/pkg-dir' } ) ) ;
4
+ expectType < Promise < string | undefined > > ( packageDirectory ( { cwd : '/Users/project/pkg-dir' } ) ) ;
5
+ expectType < string | undefined > ( packageDirectorySync ( { cwd : '/Users/project/pkg-dir' } ) ) ;
You can’t perform that action at this time.
0 commit comments