From 90125566bbaed8b5c6e55ca8dbc432e3433fb73c Mon Sep 17 00:00:00 2001 From: Maximilien Mellen Date: Wed, 19 Feb 2020 21:36:18 +0100 Subject: Enable TS strict mode by default (#3899) Fixes #3324 Co-authored-by: Kitson Kelly --- std/fs/walk.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'std/fs/walk.ts') diff --git a/std/fs/walk.ts b/std/fs/walk.ts index 108eebc46..890114525 100644 --- a/std/fs/walk.ts +++ b/std/fs/walk.ts @@ -65,9 +65,9 @@ export async function* walk( includeFiles = true, includeDirs = true, followSymlinks = false, - exts = null, - match = null, - skip = null + exts = undefined, + match = undefined, + skip = undefined }: WalkOptions = {} ): AsyncIterableIterator { if (maxDepth < 0) { @@ -76,7 +76,7 @@ export async function* walk( if (includeDirs && include(root, exts, match, skip)) { yield { filename: root, info: await stat(root) }; } - if (maxDepth < 1 || !include(root, null, null, skip)) { + if (maxDepth < 1 || !include(root, undefined, undefined, skip)) { return; } const ls: FileInfo[] = await readDir(root); @@ -119,9 +119,9 @@ export function* walkSync( includeFiles = true, includeDirs = true, followSymlinks = false, - exts = null, - match = null, - skip = null + exts = undefined, + match = undefined, + skip = undefined }: WalkOptions = {} ): IterableIterator { if (maxDepth < 0) { @@ -130,7 +130,7 @@ export function* walkSync( if (includeDirs && include(root, exts, match, skip)) { yield { filename: root, info: statSync(root) }; } - if (maxDepth < 1 || !include(root, null, null, skip)) { + if (maxDepth < 1 || !include(root, undefined, undefined, skip)) { return; } const ls: FileInfo[] = readDirSync(root); -- cgit v1.2.3