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
498 B
Text
24 lines
498 B
Text
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
|
|
);
|