@@ -329,7 +329,7 @@ module FileHandle = {
329329 external writeFileWith : (t , Buffer .t , writeFileOptions ) => Js .Promise .t <unit > = "writeFile"
330330}
331331
332- module PromiseAPI_ = {
332+ module PromiseAPI = {
333333 @module ("fs" ) @scope ("promises" )
334334 external access : @unwrap [#Str (string ) | #Buffer (Buffer .t ) | #URL (Url .t )] => Js .Promise .t <unit > =
335335 "access"
@@ -339,14 +339,11 @@ module PromiseAPI_ = {
339339 ~mode : int ,
340340 ) => Js .Promise .t <unit > = "access"
341341
342- type appendFileStrOptions
343- @obj
344- external appendFileStrOptions : (
345- ~encoding : string = ?,
346- ~mode : int = ?,
347- ~flag : Flag .t = ?,
348- unit ,
349- ) => appendFileStrOptions = ""
342+ type appendFileStrOptions = {
343+ encoding ?: string ,
344+ mode ?: int ,
345+ flag ?: Flag .t ,
346+ }
350347 @module ("fs" ) @scope ("promises" )
351348 external appendFile : (
352349 ~path : @unwrap [#Str (string ) | #Buffer (Buffer .t ) | #URL (Url .t ) | #Handle (FileHandle .t )],
@@ -360,14 +357,10 @@ module PromiseAPI_ = {
360357 ~options : appendFileStrOptions ,
361358 ) => Js .Promise .t <unit > = "appendFile"
362359
363- type appendFileBufferOptions
364- @obj
365- external appendFileBufferOptions : (
366- ~mode : int = ?,
367- ~flag : Flag .t = ?,
368- unit ,
369- ) => appendFileBufferOptions = ""
370-
360+ type appendFileBufferOptions = {
361+ mode ?: int ,
362+ flag ?: Flag .t ,
363+ }
371364 @module ("fs" ) @scope ("promises" )
372365 external appendFileBuffer : (
373366 ~path : @unwrap [#Str (string ) | #Buffer (Buffer .t ) | #URL (Url .t ) | #Handle (FileHandle .t )],
@@ -428,9 +421,10 @@ module PromiseAPI_ = {
428421 ~options : statOptions ,
429422 ) => Js .Promise .t <Stats .t > = "lstat"
430423
431- type mkdirOptions
432- @obj
433- external mkdirOptions : (~recursive : bool = ?, ~mode : int = ?, unit ) => mkdirOptions = ""
424+ type mkdirOptions = {
425+ recursive ?: bool ,
426+ mode ?: int ,
427+ }
434428
435429 @module ("fs" ) @scope ("promises" )
436430 external mkdir : @unwrap [#Str (string ) | #Buffer (Buffer .t ) | #URL (Url .t )] => Js .Promise .t <unit > =
@@ -442,11 +436,10 @@ module PromiseAPI_ = {
442436 mkdirOptions ,
443437 ) => Js .Promise .t <unit > = "mkdir"
444438
445- type mkdtempOptions
446- @obj external mdktempOptions : (~encoding : string = ?, unit ) => mkdtempOptions = ""
439+ type mkdtempOptions = {encoding ?: string }
447440
448441 @module ("fs" ) @scope ("promises" )
449- external mkdtemp : string => Js .Promise .t <string > = "mkddtemp "
442+ external mkdtemp : string => Js .Promise .t <string > = "mkdtemp "
450443
451444 @module ("fs" ) @scope ("promises" )
452445 external mkdtempWith : (
0 commit comments