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>
20 lines
419 B
Text
20 lines
419 B
Text
/**
|
|
Returns a boolean for whether the given type is `null`.
|
|
|
|
@example
|
|
```
|
|
import type {IsNull} from 'type-fest';
|
|
|
|
type NonNullFallback<T, Fallback> = IsNull<T> extends true ? Fallback : T;
|
|
|
|
type Example1 = NonNullFallback<null, string>;
|
|
//=> string
|
|
|
|
type Example2 = NonNullFallback<number, string>;
|
|
//=? number
|
|
```
|
|
|
|
@category Type Guard
|
|
@category Utilities
|
|
*/
|
|
export type IsNull<T> = [T] extends [null] ? true : false;
|