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,20 @@
class A {
constructor() {
}
foo(a) {
}
bar() {
}
}
class B extends A {
bar(override) {
}
}
B.Events = {
// Event with the same name as a super class method.
foo: 'foo'
};

View File

@@ -0,0 +1,62 @@
{
"classes": [
{
"name": "A",
"members": [
{
"name": "constructor",
"type": "method",
"hasReturn": false,
"async": false,
"args": []
},
{
"name": "foo",
"type": "method",
"hasReturn": false,
"async": false,
"args": [
"a"
]
},
{
"name": "bar",
"type": "method",
"hasReturn": false,
"async": false,
"args": []
}
]
},
{
"name": "B",
"members": [
{
"name": "bar",
"type": "method",
"hasReturn": false,
"async": false,
"args": [
"override"
]
},
{
"name": "foo",
"type": "event",
"hasReturn": false,
"async": false,
"args": []
},
{
"name": "foo",
"type": "method",
"hasReturn": false,
"async": false,
"args": [
"a"
]
}
]
}
]
}