Closed AshotN closed 9 months ago
When creating a Enum you are able to provide a default value.
status: Type.Enum(TRANSACTION_STATUS, { default: TRANSACTION_STATUS.INCOMPLETE }),
But when creating a StringEnum you do not have that option available.
StringEnum
status: StringEnum(['INCOMPLETE', 'COMPLETED', 'CANCELLED', 'APPROVED', 'DECLINED'])
I would like this to work
status: StringEnum(['INCOMPLETE', 'COMPLETED', 'CANCELLED', 'APPROVED', 'DECLINED'], { default: 'COMPLETED' }),
I can provide a PR for my suggestion to a fix
Steps to reproduce
When creating a Enum you are able to provide a default value.
But when creating a
StringEnum
you do not have that option available.Expected behavior
I would like this to work
I can provide a PR for my suggestion to a fix