JSDoc
コメント形式で書ける
documentを生成するtoolもある
型チェックをさせるには少し工夫が必要
Node.jsは知らん

記法 (一部)
$ /** @type {string} */
変数の型を指定する
$ const test = /** @type {string} */ (new Date().getTime());
js/**
* @typedef {object} Path scrapboxのリンクを表す
* @prop {string} project project name
* @prop {stirng} title page title
* @prop {string=} id line id
*/
object
は Object
でもいい
$ @prop {string=} id line id
$ @prop [string] id line id
$ @prop [string="takker"] project project name
裏を返すと、それ以外の型機能しか使わないなら、JavaScript onlyで書ける
References
TypeScriptで扱える記法
Denoもこれに準拠していると思われる
Deno環境での書き方