-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
8bcf550
commit 6c9a994
Showing
33 changed files
with
127 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
utils/doclint/check_public_api/test/js-builder-inheritance/foo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
}; |
62 changes: 62 additions & 0 deletions
62
utils/doclint/check_public_api/test/js-builder-inheritance/result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters