diff --git a/utils/doclint/check_public_api/index.js b/utils/doclint/check_public_api/index.js index 3eebc982a93..c55c95075da 100644 --- a/utils/doclint/check_public_api/index.js +++ b/utils/doclint/check_public_api/index.js @@ -35,22 +35,8 @@ const EXCLUDE_CLASSES = new Set([ ]); const EXCLUDE_METHODS = new Set([ - 'Body.constructor', - 'Browser.constructor', - 'ConsoleMessage.constructor', - 'Dialog.constructor', - 'ElementHandle.constructor', - 'Frame.constructor', - 'Headers.constructor', 'Headers.fromPayload', - 'Keyboard.constructor', - 'Mouse.constructor', - 'Touchscreen.constructor', - 'Tracing.constructor', - 'Page.constructor', 'Page.create', - 'Request.constructor', - 'Response.constructor', ]); /** @@ -145,6 +131,9 @@ function filterJSDocumentation(jsDocumentation) { const members = cls.membersArray.filter(member => { if (member.name.startsWith('_')) return false; + // Exclude all constructors by default. + if (member.name === 'constructor' && member.type === 'method') + return false; return !EXCLUDE_METHODS.has(`${cls.name}.${member.name}`); }); classes.push(new Documentation.Class(cls.name, members));