chore(dotnet): enable nullable enum arguments (#6271)

This commit is contained in:
Anže Vodovnik 2021-04-23 11:22:38 +02:00 committed by GitHub
parent 7a3f8ef7b3
commit 6e9b76fa8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -597,7 +597,8 @@ function translateType(type, parent, generateNameCallback = t => t.name) {
const innerTypeName = translateType(type.union[1], parent, generateNameCallback);
// if type is primitive, or an enum, then it's nullable
if (innerTypeName === 'bool'
|| innerTypeName === 'int') {
|| innerTypeName === 'int'
|| enumTypes.has(innerTypeName)) {
return `${innerTypeName}?`;
}