Skip to content

Commit 77aad42

Browse files
committed
Fix the signature for writeFile so contents also includes strings
1 parent 22ea45c commit 77aad42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export interface APIOptions {
165165
/** Reads a file from disk (or memory). */
166166
readFile?: (filename: string, baseDir: string) => (string | null) | Promise<string | null>;
167167
/** Writes a file to disk (or memory). */
168-
writeFile?: (filename: string, contents: Uint8Array, baseDir: string) => void | Promise<void>;
168+
writeFile?: (filename: string, contents: Uint8Array | string, baseDir: string) => void | Promise<void>;
169169
/** Lists all files within a directory. */
170170
listFiles?: (dirname: string, baseDir: string) => (string[] | null) | Promise<string[] | null>;
171171
/** Handler for diagnostic messages. */

0 commit comments

Comments
 (0)