Rocky_Mountain_Vending/.pnpm-store/v10/files/48/50b4bddb994a32c5fcfa606af936ba23ecc50f27f47940efb737407e1d88a96de8f5ca786642147cdc8b63e70aac9fed8b939376940a6fc689f214a178eba4
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

28 lines
797 B
Text

/**
Matches any non-empty string.
This is useful when you need a string that is not empty, for example, as a function parameter.
NOTE:
- This returns `never` not just when instantiated with an empty string, but also when an empty string is a subtype of the instantiated type, like `string` or `Uppercase<string>`.
@example
```
import type {NonEmptyString} from 'type-fest';
declare function foo<T extends string>(string: NonEmptyString<T>): void;
foo('a');
//=> OK
foo('');
//=> Error: Argument of type '""' is not assignable to parameter of type 'never'.
declare const someString: string
foo(someString);
//=> Error: Argument of type 'string' is not assignable to parameter of type 'never'.
```
@category String
*/
export type NonEmptyString<T extends string> = '' extends T ? never : T;