import { isRecord } from "https://deno.land/x/unknownutil@v3.16.1/mod.ts";
Return true
if the type of x
is Record<PropertyKey, unknown>
.
import { is } from "https://deno.land/x/unknownutil@v3.16.1/mod.ts";
const a: unknown = {"a": 0, "b": 1};
if (is.Record(a)) {
// a is narrowed to Record<PropertyKey, unknown>
const _: Record<PropertyKey, unknown> = a;
}