The Typed Web Components Specification is a community-driven proposal for standarization on typing the public interface exposed by Web Components.
Version | Date | Description | State |
---|---|---|---|
0.1 | 2018.11.25 | Initial version | Working draft |
Web Components are a great technology standarized by W3C and implemented by mayor browsers.
We, as Web Component users and tools authors [1], think we need to provide type information to be able to implement the following uses cases, important for Web Component massive market adoption:
- Automatic discovery and import of 3rd party web components based on type info.
- Automatic validation of type errors when using a web component.
- Standarize documentation about Web Component and usage.
On one side, innertia on the JavaScript tends to expose properties, method and parameters untyped. Typed are resolved ar runtime based on the implemented component.
On the other hand, previous experiences in component based systems and composition make quite evident that a central catalog to publish, discover and documentation make easier for customers to consume such components.
Therefore, despite the language used to implement a web component (typed or untyped), we strongly thing types are a very valuable information for consumers.
This information will enable the following scenarios:
- Automatic import a new web component to a palette of componnent for design and composition.
- Code completion in editors (IDEs).
- Validation in editors (IDE) type checking.
Therefore, to enable these scenarios, a proposal for typing web components is provided.
Anyone wanting to type its component will benefict from tooling been able to spread the usage of the components. This typing information is used in desing-time on tooling and totally erased on run-time making a zero performace on production code.
- Dr. Pedro J. Molina @pjmolina
The full specification is licensed under the Apache 2.0 Licence.