open-wc / custom-elements-manifest

Custom Elements Manifest is a file format that describes custom elements in your project.
https://custom-elements-manifest.open-wc.org/
226 stars 37 forks source link

Access modifier issue on derived class #253

Open DavideMininni-Fincons opened 1 month ago

DavideMininni-Fincons commented 1 month ago

Checklist

Expected behavior Hello guys :) I was doing some refactoring on the Lit project I'm working on, and I found a little issue.

Let's say I have a base class B with an abstract public method open, and a derived class D that implement it. Then I create a second derived class D2, and I want the method in D2 to not be public; so I change the base method in B from public to protected. This way, I would expect that D would expose a public open, while in D2 I would leave it as protected.

However, the public modifier from D is not taken into account when the manifest is created and the method is always marked as protected. I created a little demo here: https://github.com/DavideMininni-Fincons/custom-element-manifest-demo/tree/main