Skip to content

[framework]: declare when overriding a property does not change the property type #11041

@tsanislavgatev

Description

@tsanislavgatev

Bug Description

We are extending the ListItem in MenuItem and we also override a property called accessibiltiyAttributes.
We create new type that is with

type MenuItemAccessibilityAttributes = Pick<AccessibilityAttributes, "ariaKeyShortcuts" | "role"> & ListItemAccessibilityAttributes

and we declare it like:

@property({ type: Object })
declare accessibilityAttributes: MenuItemAccessibilityAttributes;

We have an issue that when application developers are using the MenuItem and giving role, validators underline with error, because in our case, the documentation is not updated and the property type is still ListItemAccessibilityAttributes.

Affected Component

No response

Expected Behaviour

A property type can be changed to a type that contains the parent type but adds more properties when extending component.

Isolated Example

No response

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

latest

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SAP

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions