Skip to content

Commit daae4e8

Browse files
authored
feat(types): add mode to fs writeFile (#423)
1 parent c31fadc commit daae4e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

runtimes/runtimes/standalone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export const standalone = (props: RuntimeProps) => {
218218
readFile(path, { encoding: (options?.encoding || 'utf-8') as BufferEncoding }),
219219
rm: (dir, options?) => rm(dir, options),
220220
isFile: path => stat(path).then(({ isFile }) => isFile()),
221-
writeFile: (path, data) => writeFile(path, data),
221+
writeFile: (path, data, options?) => writeFile(path, data, options),
222222
appendFile: (path, data) => appendFile(path, data),
223223
mkdir: (path, options?) => mkdir(path, options),
224224
readFileSync: (path, options?) =>

runtimes/server-interface/workspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export type Workspace = {
4747
readFile: (path: string, options?: { encoding?: string }) => Promise<string>
4848
isFile: (path: string) => Promise<boolean>
4949
rm: (dir: string, options?: { recursive?: boolean; force?: boolean }) => Promise<void>
50-
writeFile: (path: string, data: string) => Promise<void>
50+
writeFile: (path: string, data: string, options?: { mode?: number | string }) => Promise<void>
5151
appendFile: (path: string, data: string) => Promise<void>
5252
mkdir: (path: string, options?: { recursive?: boolean }) => Promise<string | undefined>
5353
/**

0 commit comments

Comments
 (0)