#Need help expanding a type
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
I have:
type FormValues = { [K in FieldNames]: boolean };
which is generating a type based on an enum.
But how do I add another field to this FormValues
I would like to add name: String
But I'm not sure how to add it to this.
type FormValues = { [K in FieldNames]: boolean } & { name: string };
thanks!
!resolved