This PR cherry-picks the following commits:
- 0b4de0df7f
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
991f2f9417
commit
ce68b2fd0b
|
|
@ -37,9 +37,8 @@ using System.Threading.Tasks;
|
|||
|
||||
#nullable enable
|
||||
|
||||
namespace Microsoft.Playwright
|
||||
{
|
||||
[CONTENT]
|
||||
}
|
||||
namespace Microsoft.Playwright;
|
||||
|
||||
[CONTENT]
|
||||
|
||||
#nullable disable
|
||||
|
|
|
|||
|
|
@ -183,14 +183,14 @@ fs.mkdirSync(dir, { recursive: true });
|
|||
|
||||
for (const [name, item] of Object.entries(protocol)) {
|
||||
if (item.type === 'interface') {
|
||||
const init = objectType(item.initializer || {}, ' ');
|
||||
const init = objectType(item.initializer || {}, '');
|
||||
const initializerName = name + 'Initializer';
|
||||
const superName = inherits.has(name) ? inherits.get(name) + 'Initializer' : null;
|
||||
writeCSharpClass(initializerName, superName, init.ts);
|
||||
} else if (item.type === 'object') {
|
||||
if (Object.keys(item.properties).length === 0)
|
||||
continue;
|
||||
const init = objectType(item.properties, ' ', false, name);
|
||||
const init = objectType(item.properties, '', false, name);
|
||||
writeCSharpClass(name, null, init.ts);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue