persona-community-5/.pnpm-store/v3/files/3a/1c5bac3dd659116da5e29d049660ba684bc5a2c3e7fb8fc9edee4892c1421d6f6e8a6e03e356c1669113638ea930cda18ff6f3dc79220af554702d60033abc
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
498 B
Plaintext

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