From fe9ac35a650dfeea9168fc1cbbbf323b5689fc3b Mon Sep 17 00:00:00 2001 From: uki00a Date: Mon, 24 Feb 2020 22:31:40 +0900 Subject: fix(std/examples): add tests for examples (#4094) --- std/examples/catj.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'std/examples/catj.ts') 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; -- cgit v1.2.3