Rocky_Mountain_Vending/.pnpm-store/v10/files/fb/a1e7e20c1ef05a832107ebbc6dcb2a156d126b0849a5acab01dff163b8663a7a512d141259f64279f095febc20557a880674715a20c24ce650497665698191
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

21 lines
775 B
Text

/**
* Helper type to introduce new branded types.
*
* `Base` is the underlying data type and `Tag` must be unique symbol/string.
*
* Usage:
* ```ts
* type LineNumber = Brand<number, "LineNumber">;
* type RawUrl = Brand<string, "RawUrl">;
* ```
*
* We purposefully use the string index of `_tag` rather then creating a Symbol
* wrapper that would hide if in IDEs and fail build. This means that at build
* time if one uses `<branded-var>._tag`, it will build without error and have
* potentially having a runtime error. This allows us to have multiple places
* where we define the brands and they will overlap. Also a use case for reusing
* the type in other downstream projects is simplified.
*/
export type Brand<Base, Tag> = Base & {
_tag: Tag;
};