Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions utils/doclint/check_public_api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]);

/**
Expand Down Expand Up @@ -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));
Expand Down