@@ -87,7 +87,7 @@ export async function readFile(path: any, options?: any): Promise<any> {
8787 const result = await safeReadFile ( path , options ) ;
8888 if ( result . isErr ( ) ) return undefined ;
8989
90- return result . unwrap ( ) ;
90+ return result . unwrap ( null ) ;
9191}
9292
9393export function readFileSync ( path : PathLike , options : BufferEncodingOptions ) : Buffer | undefined ;
@@ -96,7 +96,7 @@ export function readFileSync(path: any, options?: any): any {
9696 const result = safeReadFileSync ( path , options ) ;
9797 if ( result . isErr ( ) ) return undefined ;
9898
99- return result . unwrap ( ) ;
99+ return result . unwrap ( null ) ;
100100}
101101
102102export const readFileByLine = async (
@@ -106,7 +106,7 @@ export const readFileByLine = async (
106106 const result = await safeReadFileByLine ( path , options ) ;
107107 if ( result . isErr ( ) ) return undefined ;
108108
109- return result . unwrap ( ) ;
109+ return result . unwrap ( null ) ;
110110} ;
111111
112112export const readJson = async < T = any > (
@@ -116,7 +116,7 @@ export const readJson = async <T = any>(
116116 const result = await safeReadJson ( path , options ) ;
117117 if ( result . isErr ( ) ) return undefined ;
118118
119- return result . unwrap ( ) ;
119+ return result . unwrap ( null ) ;
120120} ;
121121
122122export const readJsonSync = < T = any > (
@@ -126,7 +126,7 @@ export const readJsonSync = <T = any>(
126126 const result = safeReadJsonSync ( path , options ) ;
127127 if ( result . isErr ( ) ) return undefined ;
128128
129- return result . unwrap ( ) ;
129+ return result . unwrap ( null ) ;
130130} ;
131131
132132export const rm = async ( path : PathLike , options ?: RmOptions ) : Promise < void > => {
0 commit comments