refactor(forms): add validateStandardSchema to public api (#63616)

Add `validateStandardSchema` which was accidentally omitted from the
public api.

PR Close #63616
This commit is contained in:
Miles Malerba
2025-09-07 09:25:17 -07:00
committed by Andrew Scott
parent 1233f7319d
commit 00a1806eaa
3 changed files with 20 additions and 9 deletions
@@ -226,6 +226,11 @@ export interface HttpValidatorOptions<TValue, TResult, TPathKind extends PathKin
readonly request: ((ctx: FieldContext<TValue, TPathKind>) => string | undefined) | ((ctx: FieldContext<TValue, TPathKind>) => HttpResourceRequest | undefined);
}
// @public
export type IgnoreUnknownProperties<T> = T extends Record<PropertyKey, unknown> ? {
[K in keyof T as RemoveStringIndexUnknownKey<K, T[K]>]: IgnoreUnknownProperties<T[K]>;
} : T;
// @public
export interface ItemFieldContext<TValue> extends ChildFieldContext<TValue> {
readonly index: Signal<number>;
@@ -411,6 +416,9 @@ export type ReadonlyArrayLike<T> = Pick<ReadonlyArray<T>, number | 'length' | ty
// @public
export function reducedProperty<TAcc, TItem>(reduce: (acc: TAcc, item: TItem) => TAcc, getInitial: () => TAcc): AggregateProperty<TAcc, TItem>;
// @public
export type RemoveStringIndexUnknownKey<K, V> = string extends K ? unknown extends V ? never : K : K;
// @public
export const REQUIRED: AggregateProperty<boolean, boolean>;
@@ -496,6 +504,9 @@ export function validateAsync<TValue, TParams, TResult, TPathKind extends PathKi
// @public
export function validateHttp<TValue, TResult = unknown, TPathKind extends PathKind = PathKind.Root>(path: FieldPath<TValue, TPathKind>, opts: HttpValidatorOptions<TValue, TResult, TPathKind>): void;
// @public
export function validateStandardSchema<TSchema, TValue extends IgnoreUnknownProperties<TSchema>>(path: FieldPath<TValue>, schema: StandardSchemaV1<TSchema>): void;
// @public
export function validateTree<TValue, TPathKind extends PathKind = PathKind.Root>(path: FieldPath<TValue, TPathKind>, logic: NoInfer<TreeValidator<TValue, TPathKind>>): void;