Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
468 B
Text
24 lines
468 B
Text
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
|
|
);
|