webtides / element-js

Simple and lightweight base classes for web components with a beautiful API
MIT License
28 stars 3 forks source link

add TypeScript Types for perfect npm package score #26

Closed eddyloewen closed 4 months ago

eddyloewen commented 3 years ago

Since we are now already bundling things for CDNs we could probably also add another build step to also generate and include type definitions.

As can be seen here: https://www.skypack.dev/view/@webtides/element-js - TypeScript Types is the only thing missing for a perfect score.

We don't need to convert everything to typescript just to get type definitions and better code completion etc. It should be enough to generate type definition files from JSDoc comments (which we already have for almost everything)

For more information see: https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html

eddyloewen commented 4 months ago

Has been released with 1.0