mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(dotnet): enable nullable enum arguments (#6271)
This commit is contained in:
parent
7a3f8ef7b3
commit
6e9b76fa8f
@ -597,7 +597,8 @@ function translateType(type, parent, generateNameCallback = t => t.name) {
|
|||||||
const innerTypeName = translateType(type.union[1], parent, generateNameCallback);
|
const innerTypeName = translateType(type.union[1], parent, generateNameCallback);
|
||||||
// if type is primitive, or an enum, then it's nullable
|
// if type is primitive, or an enum, then it's nullable
|
||||||
if (innerTypeName === 'bool'
|
if (innerTypeName === 'bool'
|
||||||
|| innerTypeName === 'int') {
|
|| innerTypeName === 'int'
|
||||||
|
|| enumTypes.has(innerTypeName)) {
|
||||||
return `${innerTypeName}?`;
|
return `${innerTypeName}?`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user