Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the ability to define static observedAttributes as a map of attribute names to attribute handlers for non-decorator users, and instead create a new static observedAttributeHandlers for that purpose. #27

Merged
merged 1 commit into from
Sep 15, 2024

Commits on Sep 15, 2024

  1. - feat: Deprecate the ability to define static observedAttributes a…

    …s a map of attribute names to attribute handlers for non-decorator users, and instead create a new `static observedAttributeHandlers` for that purpose. This keeps the type of `static observedAttributes` clean and aligned with the DOM spec, while the new `static observedAttributeHandlers` has the type definition for the library-specific feature. Plus this prevents type issues downstream because the `@element` decorator (callable as a function when not using decorators) coerces the object format into the standard array format, yet the object type will still sppear in subclasses despite that it is never an object in subclasses.
    
        - deprecation: `static observedAttributes = {}` is deprecated, and only the standard `static observedAttributes = []` should be used. The object format will be removed in a breaking version bump.
    - infra: Unrestrict the `typescript` version so we can keep it updated with other packages in the lume repo.
    trusktr committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    9a14080 View commit details
    Browse the repository at this point in the history