notwo / youknowFrontend

youknowのフロントエンドを担当
0 stars 0 forks source link

TypeScript導入にあたる調査 #3

Closed notwo closed 1 year ago

notwo commented 1 year ago

https://github.com/notwo/youknowFrontend/issues/13 同様に今度はTypeScriptについて簡単に調査する

TypeScript Deep Dive 日本語版を見とけ案件

notwo commented 1 year ago

文末にセミコロンをつけるつけない問題

本サービスでは全部つける deep diveで言われてるのもあるが、TSも結局はJSなわけだしJSではつける必要あるからこっちでもつける

notwo commented 1 year ago

Parameter 'e' implicitly has an 'any' type.Vetur(7006)

【TypeScript】parameter implicitly has an 'any' typeを参照 引数の型を明記すれば解決

そもそも引数含め変数の型分からん問題

種類としてどういうのがあるか=>TypeScriptの型システムに大まかに載ってる イベントについてはイベントオブジェクト型を参照するのでHTMLInputElement等を指定する。 HTML DOM APIを見るのが早そう

notwo commented 1 year ago

An async function or method in ES5/ES3 requires the 'Promise' constructor

Azure Functions を TypeScript で書いてみる。を元にtsconfig.jsonを直す

notwo commented 1 year ago

解決しているのでclose