-
-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
enhancementNew feature or requestNew feature or requestlaterMay be worked on in the future.May be worked on in the future.
Milestone
Description
Is your feature request related to a problem? Please describe.
Currently SuperValidate accepts Partial<In>
, but we have a nested object structure and want to set default values in these sub objects.
Describe the solution you'd like
I know there is no default type for DeepPartial
, but it would be nice to use DeepPartial<In>
instead of just Partial<In>
.
type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
Additional context
Currently we work around with a type cast like
import { superValidate, InferIn } from 'sveltekit-superform';
superValidate({
nested: {
some: 'data'
} as Partial<InferIn<TypeOfObject>>
});
pekeler
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlaterMay be worked on in the future.May be worked on in the future.