Open
Conversation
YusukeHirao
requested changes
Jun 14, 2024
Comment on lines
+1
to
+3
| // querySelector() または querySelectorAll() を実行する場合、次の import 文を有効にしてください。 | ||
| // import 'typed-query-selector/strict.js'; | ||
|
|
Member
There was a problem hiding this comment.
デフォルト有効でいいと思います。
ガイドラインにIssueを立てて、利用するように促しましょう。
Author
There was a problem hiding this comment.
querySelector() または querySelectorAll() を実行しない場合、無駄なインポートになる(ビルド後にコードはバンドルされませんが)かなと思いコメントアウトしました。
とはいえ、たしかにほとんどの場合実行すると思うので、有効にします!
ガイドラインでも促します!
Author
|
テスト落ちてしまいました。
現状の拡張子付きインポートにパス補完もされて、型推論が実際に有効になっていることを確認していたのですが、Vite(Rollup)的には駄目なのでしょうか。 一方、たしかに typed-query-selector のドキュメントでは拡張子なしインポートになっていますが、これだと型推論が効かず ESM、TS のインポート周りに詳しくない(奥が深すぎる)ので、調べます。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scaffold に typed-query-selector を追加しました。
querySelector()またはquerySelectorAll()に不正な文字列を指定した場合、never型になる strict モードのインポートを推奨しています。https://github.com/g-plane/typed-query-selector?tab=readme-ov-file#strict-mode
close #50