DenoでJavaScriptを型チェック対象にする
コード先頭行に[@ts-check]をつければいけるっぽい例:これを実行すると型エラーがでる`deno check --remote https://scrapbox.io/api/code/takker/DenoでJavaScriptを型チェック対象にする/sample.js``// @ts-check``const test = document.getElementById("aaa");`
$ /** @type {string} */
$ const test = /** @type {string} */ (new Date().getTime());
/**
* @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