File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed
lib/node_modules/@stdlib/fs/resolve-parent-path/docs/types Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -28,33 +28,13 @@ interface Options {
2828 dir ?: string ;
2929}
3030
31- /**
32- * Callback invoked after resolving a path.
33- */
34- type Nullary = ( ) => void ;
35-
36- /**
37- * Callback invoked after resolving a path.
38- *
39- * @param err - error argument
40- */
41- type Unary = ( err : Error ) => void ;
42-
43- /**
44- * Callback invoked after resolving a path.
45- *
46- * @param err - error argument
47- * @param path - resolved path
48- */
49- type Binary = ( err : Error , path : string | null ) => void ;
50-
5131/**
5232* Callback invoked after resolving a path.
5333*
5434* @param err - error argument
5535* @param path - resolved path
5636*/
57- type Callback = Nullary | Unary | Binary ;
37+ type Callback = ( err : Error | null , path : string | null ) => void ;
5838
5939/**
6040* Interface for resolving a path by walking parent directories.
Original file line number Diff line number Diff line change 1818
1919import resolveParentPath = require( './index' ) ;
2020
21- const done = ( error : Error , path : string | null ) => {
21+ const done = ( error : Error | null , path : string | null ) => {
2222 if ( error || path === null ) {
2323 throw error ;
2424 }
@@ -30,7 +30,6 @@ const done = ( error: Error, path: string | null ) => {
3030// The function does not have a return value...
3131{
3232 resolveParentPath ( 'package.json' , done ) ; // $ExpectType void
33- resolveParentPath . sync ( 'package.json' ) ; // $ExpectType string | null
3433}
3534
3635// The compiler throws an error if the function is provided a first argument which is not a string...
You can’t perform that action at this time.
0 commit comments