1
0
Fork
You've already forked javascript-typings
0
An example of using vanilla javascript for buildless development, leveraging typescript's type safety and docstrings for good documented and safe, as in type safe, code.
  • JavaScript 72.6%
  • TypeScript 27.4%
Find a file
Tobias Kuppens Groot 939d4f6242 feat: add typescript examples
Signed-off-by: Tobias Kuppens Groot <tkuppensgroo@uos.de>
2023年01月16日 10:35:44 +01:00
src feat: add typescript examples 2023年01月16日 10:35:44 +01:00
.gitignore inital commit 2023年01月13日 11:20:56 +01:00
CHANGELOG.md inital commit 2023年01月13日 11:20:56 +01:00
CONTRIBUTING.md inital commit 2023年01月13日 11:20:56 +01:00
LICENSE inital commit 2023年01月13日 11:20:56 +01:00
package-lock.json inital commit 2023年01月13日 11:20:56 +01:00
package.json inital commit 2023年01月13日 11:20:56 +01:00
README.md inital commit 2023年01月13日 11:20:56 +01:00
tsconfig.json chore: enable checkJS option typescript config 2023年01月16日 10:35:13 +01:00
web-dev-server.config.mjs chore: add web-dev-server config 2023年01月16日 10:34:34 +01:00

Readme

Even though Javascript doesn't offer type checks by default, one can leverage the typescript compiler in combination with JSDoc to generate type safe documentation of your code in vanillaJS.

This repository shows with simple examples why it is useful to document your function, which benefits documentation can have on your repository and the benefit of type checks and type safety by leveraging the typescript compiler to check and validate Javascript code.

Scripts

The repository offers a couple of npm run-scripts to be executed.

scripts description
clean removes a given file or directory
doc generates documentation using jsdoc
exec executes the index.js file
exec:ts executes the index.ts file
format runs code and file formatting
lint runs code linters
serve serves the generated documentation
start starts the javascript example file with file watching
start:ts starts the typescript example file with file watching
tsc complies typescript

Contributing

I don't expect any contributions to this repository. If you want to contribute, file an issue via the issues and wait.