1 | # SCRATCH (Mosaic)
|
2 |
|
3 | Realised yesterday that TS can try to work with JS but also
|
4 | has great support for JSDoc.
|
5 |
|
6 | The main reasoning for using TS i hear is generally
|
7 | intellisense (or equiv), however types without docs aren't
|
8 | really that useful.
|
9 |
|
10 | If TS can understand JS Doc comments, then potentially you
|
11 | can have a workflow where...
|
12 |
|
13 | - typings are taken from the doc comments and `tsc` is used
|
14 | to generate a declaration file.
|
15 | - the doc comments are used to generate....documentation!
|
16 |
|
17 | ## compatibility
|
18 |
|
19 | There are things that you can write in doc comments that TSC
|
20 | will understand but not JSDoc.
|
21 |
|
22 | This is also true in the other direction.
|
23 |
|
24 | There is a project tsdoc that is supposed to work with
|
25 | anything supported by TSC
|
26 |
|
27 | ## goals
|
28 |
|
29 | The goal is to have a single script that runs both tsc to
|
30 | generate a declaration file, and also generate beautiful
|
31 | docs, either with JSdoc, or TSdoc, I don't really care.
|