summaryrefslogtreecommitdiff
path: root/std/fs/expand_glob.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-21 10:36:13 -0500
committerGitHub <noreply@github.com>2020-02-21 10:36:13 -0500
commitdd8a10948195f231a6a9eb652e3f208813904ad6 (patch)
treef9a4afeb67bbead882c29c2458a5f1f99e2e42db /std/fs/expand_glob.ts
parentd9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff)
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'std/fs/expand_glob.ts')
-rw-r--r--std/fs/expand_glob.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts
index aabf4a8a1..61fca9602 100644
--- a/std/fs/expand_glob.ts
+++ b/std/fs/expand_glob.ts
@@ -10,9 +10,7 @@ import {
} from "../path/mod.ts";
import { WalkInfo, walk, walkSync } from "./walk.ts";
import { assert } from "../testing/asserts.ts";
-const { ErrorKind, cwd, stat, statSync } = Deno;
-type ErrorKind = Deno.ErrorKind;
-type DenoError = Deno.DenoError<ErrorKind>;
+const { cwd, stat, statSync } = Deno;
type FileInfo = Deno.FileInfo;
export interface ExpandGlobOptions extends GlobOptions {
@@ -45,7 +43,7 @@ function split(path: string): SplitPath {
}
function throwUnlessNotFound(error: Error): void {
- if ((error as DenoError).kind != ErrorKind.NotFound) {
+ if (!(error instanceof Deno.Err.NotFound)) {
throw error;
}
}