fix(types): don't report events as class members (#3874)

This commit is contained in:
Joel Einbinder 2019-01-31 17:53:16 -08:00 committed by Andrey Lushnikov
parent 3c516f2114
commit 5cca7c0cae

View File

@ -67,7 +67,8 @@ function classToString(classDesc) {
parts.push(` ${method}(event: '${eventName}', listener: (arg0 : ${typeToString(value && value.type, classDesc.name, eventName, 'payload')}) => void): this;\n`);
}
}
parts.push(classDesc.membersArray.map(member => ` ${memberJSDOC(member, ' ')}${member.name}${argsFromMember(member, classDesc.name)}: ${typeToString(member.type, classDesc.name, member.name)};`).join('\n\n'));
const members = classDesc.membersArray.filter(member => member.kind !== 'event');
parts.push(members.map(member => ` ${memberJSDOC(member, ' ')}${member.name}${argsFromMember(member, classDesc.name)}: ${typeToString(member.type, classDesc.name, member.name)};`).join('\n\n'));
parts.push('}\n');
return parts.join('\n');
}