1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AIでの自動コーディングの際にTypeScriptの型エラーをスルーさせない

Last updated at Posted at 2025-10-10

コーディングエージェントを利用されていますか?

TypeScriptは型付言語ですが、バンドラでホットローディングしているときなど、場合によっては型チェックが厳密に行われない場合があり、見た目上、AIがただしくコーディングしているようにふるまうときがあります。

あとで見つけるとイラっとしますね😓

その場合は、エージェントのメモリへ以下のように記述してみてください。

# TypeScriptの型チェック
ts/tsxを編集したら、tsc --noEmitで型チェックを実施すること。

TypeScriptのtscコンパイラは--noEmitオプションで、ファイルをアウトプットせずにコンパイルチェックのみ行うことができます。

参考

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?