fix(std/examples): add tests for examples (#4094)

This commit is contained in:
uki00a 2020-02-24 22:31:40 +09:00 committed by GitHub
parent 162d66d23f
commit fe9ac35a65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 258 additions and 5 deletions

View file

@ -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;