persona-community-5/.pnpm-store/v3/files/1d/1642486b9c44f8da930880e5bd212ec32014130d2da4c32c1d923fbe0c21e0f42ebd57f337eca2d0e1f7961130e8d259dd3db88f68502d2b562e4175d4d4ba
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

32 lines
631 B
Plaintext

/**
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>;