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>
30 lines
754 B
Text
30 lines
754 B
Text
import {
|
|
FieldName,
|
|
FieldValues,
|
|
ResolverOptions,
|
|
ResolverResult,
|
|
} from 'react-hook-form';
|
|
import * as Vest from 'vest';
|
|
|
|
export type ICreateResult<
|
|
TValues extends FieldValues = FieldValues,
|
|
TContext = any,
|
|
> = ReturnType<
|
|
typeof Vest.create<
|
|
any,
|
|
any,
|
|
(values: TValues, names?: FieldName<TValues>[], context?: TContext) => void
|
|
>
|
|
>;
|
|
|
|
export type Resolver = <TValues extends FieldValues, TContext>(
|
|
schema: ICreateResult<TValues, TContext>,
|
|
schemaOptions?: never,
|
|
factoryOptions?: { mode?: 'async' | 'sync'; rawValues?: boolean },
|
|
) => (
|
|
values: TValues,
|
|
context: TContext | undefined,
|
|
options: ResolverOptions<TValues>,
|
|
) => Promise<ResolverResult<TValues>>;
|
|
|
|
export type VestErrors = Record<string, string[]>;
|