fix event type parsing

pull/366/head^2
Cory LaViska 2021-03-10 08:33:50 -05:00
rodzic 7b907bc326
commit d5af772444
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -10,6 +10,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Add touch support to `sl-rating` [#362](https://github.com/shoelace-style/shoelace/pull/362)
- Fixed a bug where the `open` attribute on `sl-details` would prevent it from opening [#357](https://github.com/shoelace-style/shoelace/issues/357)
- Fixed event detail type parsing so component class names are shown instead of `default`
## 2.0.0-beta.30

Wyświetl plik

@ -152,6 +152,17 @@ components.map(async component => {
'{ ' +
param.declaration.children
.map(child => {
// Component exports aren't named, so they appear as "default" in the type data. However, we can use the
// id to link them to the right class.
if (child.type.name === 'default') {
const component = components.find(component => component.id === child.type.id);
if (component) {
child.type.name = component.name;
} else {
child.type.name = 'unknown';
}
}
if (child.type.type === 'intrinsic' || child.type.type === 'reference') {
return `${child.name}: ${child.type.name}`;
} else if (child.name) {