#Need help expanding a type

1 messages · Page 1 of 1 (latest)

lone geyser
#

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.

steep olive
#
type FormValues = { [K in FieldNames]: boolean } & { name: string };
lone geyser
#

thanks!

safe forum
#

!resolved