4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Webstorm】静的解析がおかしい

4
Posted at

はじめに

  • react-router-domのRouteコンポーネントのelementに React.ReactNode | undefined しかいれられないので、JSX.elementはダメですと怒られたのが最初

問題

  • 静的解析がおかしい

解決

  • 最新版にしたら解決した
  • 元のバージョンが古すぎたのか、1回バージョンアップでは2025年の新めのものになった。再度バージョンアップすると2026年版になり解決

終わりに

  • 「はじめに」のあと、色々設定を見てpropsとかコンパイルいるものだけ、エディタ上に出ずにtsマークからコンパイルをすると下の窓だけに出るとか、色々あったが結局バージョンを上げて解決した
  • JetBrains IDEに関して、PHPStormは動的型付けでコードジャンプ便利に思っているが、Webstormでtsのプロジェクトを見る時とか、monorepoをInteliJで見ている時に使いこなせてなくてメリットあまり感じていないのでVSCodeとかZedでもいいかもと思った。
  • 結局「はじめに」の件はJSX.elementをpropsにするのは問題なかったみたいなので(公式の書き方真似しているので正しいはず)自分の環境がおかしいだけだった
4
2
2

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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?