16
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TypeScript のエラーメッセージは、日本語化できる

Last updated at Posted at 2018-10-18

TypeScript のエラーメッセージは、 yarn tsc --help --all を見ていて、日本語化できることを知りました。
多分使うことは無いですが。

入力

Object.asgin({}, {a: 1})

コマンド

yarn tsc --locale 'ja-jp'

出力

~> yarn tsc --locale 'ja-jp'
# yarn run v1.7.0
# $ /Users/kazuya/hoge/node_modules/.bin/tsc --locale ja-jp
index.ts:24:10 - error TS2551: プロパティ 'asign' は型 'ObjectConstructor' に存在していません。
'assign' ですか?
1   Object.asgin({}, {a: 1})
           ~~~~~
  node_modules/typescript/lib/lib.es2015.core.d.ts:286:5
    286     assign<T, U>(target: T, source: U): T & U;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    'assign' is declared here.

普段怒ってきますが、日本語だとかわいいですね。

ちなみに、 yarn tsc --help には表示されていないオプションです。

16
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?