-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate “x-element.d.ts” from JSDoc comments.
Previously, the “x-element.d.ts” file was hand-curated, which was prone to falling out of date. Because the TypeScript team manages JSDoc, it’s fairly straightforward to properly “type” your JS with JSDoc and output declarations which can be used by folks writing TypeScript — all of that without needing to actually author TypeScript ourselves.† Additionally, tools like JSR will build basic documentation for libraries which author JSDoc comments, so some wins there. Finally, to ensure best practices for our JSDocs, we enable some recommended rules from the eslint plugin. † One goal of “x-element” is to be _highly_ portable, it’s why no dependencies exist and why the “x-element.js” file can be used _verbatim_ without a build step.
- Loading branch information
1 parent
3c2ea59
commit 71fa53b
Showing
10 changed files
with
620 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{ | ||
"name": "@netflix/x-element", | ||
"version": "1.0.0", | ||
"exports": "./x-element.js" | ||
"exports": { | ||
"./x-element.js": "./x-element.js", | ||
"./x-element.d.ts": "./x-element.d.ts" | ||
}, | ||
"include": [ | ||
"./x-element.js", | ||
"./x-element.d.ts", | ||
"./x-element.d.ts.map" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.