persona-community-5/.pnpm-store/v3/files/f6/96e52dafb8001a3d0fddb3adbc0f74f1e6da01901699da3156eb329ca729aa432ce406dbae04aa7d7f48f007f2a401227f3b155767862b2222a3adb95d563b
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
468 B
Plaintext

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