web-component-analyzer
web-component-analyzer copied to clipboard
Methods should be a ComponentMember, attributes should be separate.
Properties and methods are actual members of the component class. Attributes are not represented in the JavaScript object model. The current organization of properties and attributes being collected into members and methods being separate doesn't match this.
I would suggest the following reorganization:
export type ComponentMemberKind = "property" | "method";
export type ComponentMember = ComponentMemberProperty | ComponentMemberMethod;
export interface ComponentFeatures {
members: ComponentMember[];
attributes: ComponentAttribute[];
events: ComponentEvent[];
slots: ComponentSlot[];
cssProperties: ComponentCssProperty[];
cssParts: ComponentCssPart[];
}