0.0.3 • Published 5 years ago

typecomment v0.0.3

Weekly downloads
21
License
-
Repository
-
Last release
5 years ago

TypeScript Comment Types

This repository is an experiment in converting JavaScript files with TypeScript type comments to TypeScript files for type checking without emitting.

This is useful for when you need your files to remain valid JavaScript files, but also want to use actual TypeScript instead of something like allowJs+checkJs+JSDoc. In my experience, JSDoc is very limited and not useful enough in more complex typing scenarios (generics, overloads, inference etc.).

See also the TypeScript issue on this topic.

Running

See the online demo.

Testing

npm.io

This Azure Pipeline running TypeScript is deliberately failing to showcase the TypeScript type-check error.

Contributing

  • Use the TypeScript compiler API to find the comments and replace them with their contents
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago