Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Jul 7, 2024
1 parent c0e4f43 commit 6c28bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export interface FileSystem {
readonly moveFile: (from: string, to: string) => TE.TaskEither<Error, void>
}

const readFile = TE.taskify<fs.PathLike, string, NodeJS.ErrnoException, string>(fs.readFile)
const readFile = TE.taskify<fs.PathLike, { readonly encoding: 'utf8' }, NodeJS.ErrnoException, string>(fs.readFile)
const writeFile = TE.taskify<fs.PathLike, string, NodeJS.ErrnoException, void>(fs.writeFile)
const copyFile = TE.taskify<fs.PathLike, fs.PathLike, NodeJS.ErrnoException, void>(fs.copyFile)
const glob = TE.taskify<string, Error, ReadonlyArray<string>>(G)
const mkdirTE = TE.taskify(fs.mkdir)
const moveFile = TE.taskify<fs.PathLike, fs.PathLike, NodeJS.ErrnoException, void>(fs.rename)

export const fileSystem: FileSystem = {
readFile: (path) => readFile(path, 'utf8'),
readFile: (path) => readFile(path, { encoding: 'utf8' }),
writeFile,
copyFile,
glob,
Expand Down

0 comments on commit 6c28bc4

Please sign in to comment.