addCase

Add a new enum case to this field.

await enumField.addCase({
	name: "Name",
	nameByLocale: {
		nl: { action: "set", value: "Naam" }
	}
})

Parameters

  • attributes: CreateEnumCase – An object with the enum case name and optional localized names.

Returns

  • Promise<EnumCase | null> – The newly created EnumCase, or null if the case could not be added.