summaryrefslogtreecommitdiff
path: root/std/fs/walk.ts
diff options
context:
space:
mode:
authorMaximilien Mellen <maxmellen0@gmail.com>2020-02-19 21:36:18 +0100
committerGitHub <noreply@github.com>2020-02-19 15:36:18 -0500
commit90125566bbaed8b5c6e55ca8dbc432e3433fb73c (patch)
treebf798a408b26264641260395ce8cfc9d4bb37637 /std/fs/walk.ts
parent852823fa505d75d61e70e1330bbf366aa248e650 (diff)
Enable TS strict mode by default (#3899)
Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'std/fs/walk.ts')
-rw-r--r--std/fs/walk.ts16
1 files changed, 8 insertions, 8 deletions
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<WalkInfo> {
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<WalkInfo> {
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);