diff options
author | uki00a <uki00a@gmail.com> | 2020-02-24 22:31:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 08:31:40 -0500 |
commit | fe9ac35a650dfeea9168fc1cbbbf323b5689fc3b (patch) | |
tree | 56008d06659dbc0cc167eb0380006dbc5b3d48f4 /std/examples/catj.ts | |
parent | 162d66d23fe984d7ac0396faacb8800f19a719fd (diff) |
fix(std/examples): add tests for examples (#4094)
Diffstat (limited to 'std/examples/catj.ts')
-rw-r--r-- | std/examples/catj.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/std/examples/catj.ts b/std/examples/catj.ts index 7951eeeb0..4329d27b1 100644 --- a/std/examples/catj.ts +++ b/std/examples/catj.ts @@ -12,7 +12,8 @@ import * as colors from "../fmt/colors.ts"; const decoder = new TextDecoder(); -function isObject(arg): arg is object { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function isObject(arg: any): arg is object { return !!arg && arg.constructor === Object; } @@ -35,7 +36,8 @@ function printValue(value: unknown, path: string): void { console.log(path + " = " + value); } -function printObject(obj: object, path: string): void { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function printObject(obj: { [key: string]: any }, path: string): void { for (const key of Object.keys(obj)) { const value = obj[key]; let nodePath = path + colors.cyan(".") + key; |