Skip to content

Commit 1ca9f87

Browse files
committed
fix: include null in return type
1 parent 9e689ff commit 1ca9f87

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/node_modules/@stdlib/os/configdir/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* var dir = configdir( 'appname/config' );
3838
* // e.g., returns '/Users/<username>/Library/Preferences/appname/config'
3939
*/
40-
declare function configdir( p?: string ): string;
40+
declare function configdir( p?: string ): string | null;
4141

4242

4343
// EXPORTS //

lib/node_modules/@stdlib/os/configdir/docs/types/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import configdir = require( './index' );
2323

2424
// The function returns a string...
2525
{
26-
configdir(); // $ExpectType string
27-
configdir( 'appname/config' ); // $ExpectType string
26+
configdir(); // $ExpectType string | null
27+
configdir( 'appname/config' ); // $ExpectType string | null
2828
}
2929

3030
// The compiler throws an error if the function is provided a value other than a string...

0 commit comments

Comments
 (0)