chore(doclint): support classes inheritance (#935)

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 commit is contained in:
Andrey Lushnikov
2017-10-02 13:38:44 -07:00
committed by GitHub
parent 8bcf550bb6
commit 6c9a99477b
33 changed files with 127 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
### class: Foo
This is a class.
#### event: 'frame'
- <[Frame]>
This event is dispatched.
#### foo.$(selector)
- `selector` <[string]> A selector to query page for
- returns: <[Promise]<[ElementHandle]>>
The method runs document.querySelector.
#### foo.url
- <[string]>
Contains the URL of the request.

View File

@@ -0,0 +1,32 @@
{
"classes": [
{
"name": "Foo",
"members": [
{
"name": "frame",
"type": "event",
"hasReturn": false,
"async": false,
"args": []
},
{
"name": "$",
"type": "method",
"hasReturn": true,
"async": false,
"args": [
"selector"
]
},
{
"name": "url",
"type": "property",
"hasReturn": false,
"async": false,
"args": []
}
]
}
]
}