persona-community-5/.pnpm-store/v3/files/3d/ca9ab7d4d18ef87b7210ab8e9d655b50c4d57928c1e2040846394593c99d924b2f0c04b1aaafff989bf33668f11edd510bbbeda6efba4d9abce30c3a5f4979
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

25 lines
528 B
Plaintext

import type {IsUnknown} from './is-unknown';
/**
An if-else-like type that resolves depending on whether the given type is `unknown`.
@see {@link IsUnknown}
@example
```
import type {IfUnknown} from 'type-fest';
type ShouldBeTrue = IfUnknown<unknown>;
//=> true
type ShouldBeBar = IfUnknown<'not unknown', 'foo', 'bar'>;
//=> 'bar'
```
@category Type Guard
@category Utilities
*/
export type IfUnknown<T, TypeIfUnknown = true, TypeIfNotUnknown = false> = (
IsUnknown<T> extends true ? TypeIfUnknown : TypeIfNotUnknown
);