Murelio

必要な機能を読み込んでいます。

TypeScriptフォーマッター

TypeScriptをPrettier standaloneのTypeScript parserでformatします。

使い方

  1. TypeScript sourceを入力して実行します。

主な機能と処理範囲

typescript・estree pluginでtype annotationを含むsourceを構造的に整えます。

処理の仕組み

parser:'typescript'でprettier.formatします。

例

compactなtype宣言が読みやすくなります。

こんな場面で便利

  • TS interface・type・function snippetのformatに

利用前の確認

  • TypeScript compilerは走らずtype errorは診断しません。

よくある質問

type errorも出ますか?

いいえ。format parseとtypecheckは別です。

関連ツール