Skip to content

[@lit-labs/router] Protected properties renamed breaking subclassing. #2925

@AndrewJakubowicz

Description

@AndrewJakubowicz

Expect the following to work:

class Foo extends Routes {
  log() {
    console.log(this._currentRoute);
  }
}

What actually happens: this_currentRoute doesn't exist because it has been renamed by our rollup renaming rule which renames properties prefixed with _.

Any publicly accessible API should not be renamed. Audit the router API.

Members that need resolving on the Routes class:

  • _parentRoutes
  • _currentPathname
  • _currentRoute
  • _currentParams
  • _host

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions