Sha256: ada60ff3698e7fd0c7ed0e4d93286ee28aed87f648f6748e668a57308fde5a67
Contents?: true
Size: 631 Bytes
Versions: 28
Compression:
Stored size: 631 Bytes
Contents
/** Represents an object with `unknown` value. You probably want this instead of `{}`. Use case: You have an object whose keys and values are unknown to you. @example ``` import type {UnknownRecord} from 'type-fest'; function toJson(object: UnknownRecord) { return JSON.stringify(object); } toJson({hello: 'world'}); //=> '{"hello":"world"}' function isObject(value: unknown): value is UnknownRecord { return typeof value === 'object' && value !== null; } isObject({hello: 'world'}); //=> true isObject('hello'); //=> false ``` @category Type @category Object */ export type UnknownRecord = Record<PropertyKey, unknown>;
Version data entries
28 entries across 28 versions & 2 rubygems