-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Is there a way to get fields in the inferred type to be marked as readonly?
I'm thinking of something like this:
export const SCHEMA = v.object({
regular_field: v.string(),
optional_field: v.string().optional(),
readonly_field: v.string().readonly(),
});
export type InferredType = v.Infer<typeof SCHEMA>;
..resulting in:
type InferredType = {
optional_field?: string | undefined;
regular_field: string;
readonly readonly_field: string;
}
Metadata
Metadata
Assignees
Labels
No labels