chore: fix .NET generator (#17849)

This commit is contained in:
Max Schmitt 2022-10-05 21:01:57 +02:00 committed by GitHub
parent ff15fcf911
commit e8413264fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ function objectType(props, indent, onlyOptional = false, parentName = '') {
return { ts: `${indent}{${inner.ts}\n${indent}}`, scheme: `tObject({\n${inner.scheme}\n${indent}})` }; return { ts: `${indent}{${inner.ts}\n${indent}}`, scheme: `tObject({\n${inner.scheme}\n${indent}})` };
} }
const yml = fs.readFileSync(path.join(__dirname, '..', 'packages', 'playwright-core', 'src', 'protocol', 'protocol.yml'), 'utf-8'); const yml = fs.readFileSync(path.join(__dirname, '..', 'packages', 'protocol', 'src', 'protocol.yml'), 'utf-8');
const protocol = yaml.parse(yml); const protocol = yaml.parse(yml);
for (const [name, value] of Object.entries(protocol)) { for (const [name, value] of Object.entries(protocol)) {
@ -198,7 +198,7 @@ for (const [name, item] of Object.entries(protocol)) {
/** /**
* *
* @param {string} className * @param {string} className
* @param {string|undefined} inheritFrom * @param {string|null} inheritFrom
* @param {any} serializedProperties * @param {any} serializedProperties
*/ */
function writeCSharpClass(className, inheritFrom, serializedProperties) { function writeCSharpClass(className, inheritFrom, serializedProperties) {