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

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/type-fest/source/unknown-record.d.ts