Open thepassle opened 4 years ago
I guess this is happening because
class C extends SuperD {
ccc = 'c';
}
isnt exported. But this means there is no way for me to get the information of class C
if I write my code like:
class C extends SuperD {
ccc = 'c';
}
customElements.define('c-c', C);
While I think its good practice to separate class definitions from the custom elements definition, I still think this should be supported because there'll be a lot of code thats written like this
@thepassle this is one of the things I mentioned in https://github.com/webcomponents/custom-elements-json/pull/9#issuecomment-699042840
We should separate declarations from exports so that SuperD
can be documented.
SuperD
in that example actually is present in the output, the problem is:
import { SuperD } from './SuperD.js';`
class C extends SuperD {
ccc = 'c';
}
customElements.define('c-c', C);
There is only a definition for C
, but the actual classdoc (and any fields etc) is missing from the output custom-elements.json
Given:
where
SuperD.js
looks like:In the custom-elements.json output, I only get the definition:
I would also expect the
C
class to be present in my custom-elements.json