summaryrefslogtreecommitdiff
path: root/std/node/_fs
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/_fs')
-rw-r--r--std/node/_fs/_fs_access.ts6
-rw-r--r--std/node/_fs/_fs_common.ts8
-rw-r--r--std/node/_fs/_fs_dir.ts6
3 files changed, 14 insertions, 6 deletions
diff --git a/std/node/_fs/_fs_access.ts b/std/node/_fs/_fs_access.ts
index df84eac9c..8fb8cc7e6 100644
--- a/std/node/_fs/_fs_access.ts
+++ b/std/node/_fs/_fs_access.ts
@@ -8,9 +8,9 @@ import { notImplemented } from "../_utils.ts";
//TODO - 'path' can also be a Buffer. Neither of these polyfills
//is available yet. See https://github.com/denoland/deno/issues/3403
export function access(
- path: string | URL, // eslint-disable-line @typescript-eslint/no-unused-vars
- modeOrCallback: number | Function, // eslint-disable-line @typescript-eslint/no-unused-vars
- callback?: CallbackWithError, // eslint-disable-line @typescript-eslint/no-unused-vars
+ _path: string | URL,
+ _modeOrCallback: number | ((...args: unknown[]) => void),
+ _callback?: CallbackWithError,
): void {
notImplemented("Not yet available");
}
diff --git a/std/node/_fs/_fs_common.ts b/std/node/_fs/_fs_common.ts
index 165b9aeca..5d3f02a5d 100644
--- a/std/node/_fs/_fs_common.ts
+++ b/std/node/_fs/_fs_common.ts
@@ -47,7 +47,13 @@ export function isFileOptions(
}
export function getEncoding(
- optOrCallback?: FileOptions | WriteFileOptions | Function | Encodings | null,
+ optOrCallback?:
+ | FileOptions
+ | WriteFileOptions
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ | ((...args: any[]) => any)
+ | Encodings
+ | null,
): Encodings | null {
if (!optOrCallback || typeof optOrCallback === "function") {
return null;
diff --git a/std/node/_fs/_fs_dir.ts b/std/node/_fs/_fs_dir.ts
index 7f2085b3b..20239d4f3 100644
--- a/std/node/_fs/_fs_dir.ts
+++ b/std/node/_fs/_fs_dir.ts
@@ -17,7 +17,8 @@ export default class Dir {
return this.dirPath;
}
- read(callback?: Function): Promise<Dirent | null> {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ read(callback?: (...args: any[]) => void): Promise<Dirent | null> {
return new Promise((resolve, reject) => {
if (!this.asyncIterator) {
this.asyncIterator = Deno.readDir(this.path)[Symbol.asyncIterator]();
@@ -55,7 +56,8 @@ export default class Dir {
* directories, and therefore does not need to close directories when
* finished reading.
*/
- close(callback?: Function): Promise<void> {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ close(callback?: (...args: any[]) => void): Promise<void> {
return new Promise((resolve, reject) => {
try {
if (callback) {