mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(dotnet): allow nullable channels (#36114)
This commit is contained in:
parent
eb5e3b3740
commit
a6f71a6740
@ -144,7 +144,10 @@ function properties(properties, indent, onlyOptional, parentName, level) {
|
||||
continue;
|
||||
ts.push('');
|
||||
ts.push(`${indent}[JsonPropertyName("${name}")]`);
|
||||
ts.push(`${indent}public ${inner.ts}${nullableSuffix(inner)} ${toTitleCase(name)} { get; set; }`);
|
||||
let suffix = ''
|
||||
if (!['bool', 'int', 'System.Text.Json.JsonElement'].includes(inner.ts))
|
||||
suffix = ' = null!;'
|
||||
ts.push(`${indent}public ${inner.ts}${nullableSuffix(inner)} ${toTitleCase(name)} { get; set; }${suffix}`);
|
||||
const wrapped = inner.optional ? `tOptional(${inner.scheme})` : inner.scheme;
|
||||
scheme.push(`${indent}${name}: ${wrapped},`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user