Skip to content

Commit

Permalink
fix(docgen): typescript: skip inherited methods
Browse files Browse the repository at this point in the history
  • Loading branch information
drauggres committed Feb 6, 2020
1 parent 0b7916c commit b2e0251
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/titanium-docgen/generators/typescript_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const knowInterfacesList = [
'Global.console'
];

const eventsMethodsList = [
const eventsMethods = [
'addEventListener',
'removeEventListener',
'fireEvent'
Expand Down Expand Up @@ -893,7 +893,11 @@ class MemberNode {
if (this.fullyQualifiedName === 'Titanium.Proxy' && /LifecycleContainer$/.test(methodDoc.name)) {
methodDoc.optional = true;
}
if (this.proxyEventMap && eventsMethodsList.includes(methodDoc.name)) {
const isEventMethod = eventsMethods.includes(methodDoc.name);
if (!isEventMethod && methodDoc.__inherits && methodDoc.__inherits !== this.fullyQualifiedName && !this.membersAreStatic) {
return;
}
if (this.proxyEventMap && isEventMethod) {
const parameters = [ {
name: 'name',
optional: false,
Expand Down

0 comments on commit b2e0251

Please sign in to comment.