Rocky_Mountain_Vending/.pnpm-store/v10/files/4c/7f4ed59d2fd6b5aaf0c9e7057769a84c0eda37b66b18f196104231653a40cab3b7d9b8df5f63a4c261f832fd4b337fb28e926e4714ca17bfae95546e159607
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

34 lines
1.4 KiB
Text

/**
* @public
*
* Transforms any members of the object T having type FromType
* to ToType. This applies only to exact type matches.
*
* This is for the case where FromType is a union and only those fields
* matching the same union should be transformed.
*/
export type Transform<T, FromType, ToType> = ConditionalRecursiveTransformExact<T, FromType, ToType>;
/**
* @internal
*
* Returns ToType if T matches exactly with FromType.
*/
type TransformExact<T, FromType, ToType> = [T] extends [FromType] ? ([FromType] extends [T] ? ToType : T) : T;
/**
* @internal
*
* Applies TransformExact to members of an object recursively.
*/
type RecursiveTransformExact<T, FromType, ToType> = T extends Function ? T : T extends object ? {
[key in keyof T]: [T[key]] extends [FromType] ? [FromType] extends [T[key]] ? ToType : ConditionalRecursiveTransformExact<T[key], FromType, ToType> : ConditionalRecursiveTransformExact<T[key], FromType, ToType>;
} : TransformExact<T, FromType, ToType>;
/**
* @internal
*
* Same as RecursiveTransformExact but does not assign to an object
* unless there is a matching transformed member.
*/
type ConditionalRecursiveTransformExact<T, FromType, ToType> = [T] extends [
RecursiveTransformExact<T, FromType, ToType>
] ? [RecursiveTransformExact<T, FromType, ToType>] extends [T] ? T : RecursiveTransformExact<T, FromType, ToType> : RecursiveTransformExact<T, FromType, ToType>;
export {};