Skip to content

Conversation

@aslushnikov
Copy link
Contributor

This patch:

  • gives meaningful names to doclint tests
  • supports classes inheritance in documentation linter. When class A
    extends class B, all methods of class B are added to documentation of
    class A.

This is a prerequisite for Object Handles: ElementHandle will be
extending ObjectHandle.

References #382

This patch:
- gives meaningful names to doclint tests
- supports classes inheritance in documentation linter. When class A
  extends class B, all methods of class B are added to documentation of
  class A.

This is a prerequisite for Object Handles: ElementHandle will be
extending ObjectHandle.

References puppeteer#382
for (const source of sources) {
const outline = new JSOutline(source.text());
classes.push(...outline.classes);
errors.push(...outline.errors);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we cloning the map?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's because super classes are not necessarily defined in the same file

function recreateClassesWithInheritance(classes, inheritance) {
const classesByName = new Map(classes.map(cls => [cls.name, cls]));
return classes.map(cls => {
const membersMap = new Map();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does wp stand for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

work pointer

@aslushnikov aslushnikov merged commit 6c9a994 into puppeteer:master Oct 2, 2017
@aslushnikov aslushnikov deleted the support-inheritance branch October 10, 2017 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants