From cabe63eb05f334bc9921dc8633b254b05519b434 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Thu, 12 Mar 2020 14:12:27 +0000 Subject: fix: Node polyfill fsAppend rework (#4322) * My original implementation of `fs.appendFile` used an async API, which, though it would work fine as a polyfill, wasn't an exact match with the Node API. This PR reworks that API to mimic the Node API fully as a synchronous void function with an async internal implementation. * Refactor move of other internal fs `dirent` and `dir` classes to the _fs internal directory. --- std/node/_fs/_fs_common.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'std/node/_fs/_fs_common.ts') diff --git a/std/node/_fs/_fs_common.ts b/std/node/_fs/_fs_common.ts index 4de0899ea..ebdd28d64 100644 --- a/std/node/_fs/_fs_common.ts +++ b/std/node/_fs/_fs_common.ts @@ -1,4 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + +export type CallbackWithError = (err?: Error) => void; + export interface FileOptions { encoding?: string; mode?: number; -- cgit v1.2.3