Skip to content

BaseAvatar properties should be abstract #2349

@bennypowers

Description

@bennypowers

Description of the issue

BaseAvatar implements its own size property

/** Size of the Avatar */
@property({ reflect: true }) size: 'sm'|'md'|'lg'|'xl' = 'sm';

this could present a problem in the future,

class JazzyAvatar extends BaseAvatar {
  @property() size?: 'louis'|'miles'|'john'|'duke';
}

Property 'size' in type 'JazzyAvatar' is not assignable to the same property in base type 'BaseAvatar'.
Type '"louis" | "miles" | "john" | "duke" | undefined' is not assignable to type '"sm" | "md" | "lg" | "xl"'.
Type 'undefined' is not assignable to type '"sm" | "md" | "lg" | "xl"'.

BaseAvatar's size property should be an abstract optional string

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions