Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: do not yell at templated types in doc lint (#409)

Pavel Feldmane0693654b70d
diff --git a/utils/doclint/check_public_api/index.js b/utils/doclint/check_public_api/index.js
index d779fdb7d8..7c1d919ec6 100644
--- a/utils/doclint/check_public_api/index.js
+++ b/utils/doclint/check_public_api/index.js
@@ -161,8 +161,11 @@ function compareDocumentations(actual, expected) {
const propertyDiff = diff(actualProperties, expectedProperties);
for (const propertyName of propertyDiff.extra)
errors.push(`Non-existing property found: ${className}.${propertyName}`);
- for (const propertyName of propertyDiff.missing)
+ for (const propertyName of propertyDiff.missing) {
+ if (propertyName === 'T')
+ continue;
errors.push(`Property not found: ${className}.${propertyName}`);
+ }
const actualEvents = Array.from(actualClass.events.keys()).sort();
const expectedEvents = Array.from(expectedClass.events.keys()).sort();
@@ -192,6 +195,8 @@ function compareDocumentations(actual, expected) {
// TODO(@JoelEinbinder): check functions and Serializable
if (actual.name.includes('unction') || actual.name.includes('Serializable'))
return;
+ if (expected.name === 'T' || expected.name.includes('[T]'))
+ return;
// We don't have nullchecks on for TypeScript
const actualName = actual.name.replace(/[\? ]/g, '').replace(/ElementHandle\<Node\>/g, 'ElementHandle');
// TypeScript likes to add some spaces