- From: Russell Bicknell <notifications@github.com>
- Date: Tue, 25 Feb 2020 10:11:36 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 25 February 2020 18:11:49 UTC
I don't think inheritance is necessary to get basically all of the benefits and might be worth leaving out of first iteration of this. It opens the door for accidental dependence on transitive dependencies (for example, component set authors creating / exporting a registry with their package's components in one big bundle) and adds complexity to the lookup process that makes it harder to understand where your definitions come from, when you should generally know where the elements you depend on are defined. Separate topic: I'd like to recommend that `.getDefinitions()` and the `definitions` option in the constructor object use Map-like entries since registries are basically a fancy map and this is how Map iterators / `.entries()` work. (`{definitions: {'x-a': A, 'x-b': B}}` would become `{definitions: [['x-a', A], ['x-b', B]]}`) You can still use object literals for sugar by wrapping them in `Object.entries`. For example: `{definitions: Object.entries({'x-a': A, 'x-b': B})}`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/pull/865#issuecomment-590990617
Received on Tuesday, 25 February 2020 18:11:49 UTC