next.js
3ecf087f - [TypeScript Plugin] Moved the diagnostics' positions to the prop's type instead of the value for client-boundary warnings (#79193)

Commit
362 days ago
[TypeScript Plugin] Moved the diagnostics' positions to the prop's type instead of the value for client-boundary warnings (#79193) Best be reviewed with "Hide whitespace". ### Why? Since it was matching `ts.isObjectBindingPattern`, which checks only the destructured props: ![CleanShot 2025-05-14 at 12 17 25@2x](https://github.com/user-attachments/assets/44aaffd2-9276-486e-86ce-acb77d488ab0) It didn't handle non-destructured: ![CleanShot 2025-05-14 at 12 17 34@2x](https://github.com/user-attachments/assets/23abc130-3e17-4f72-89a2-bc084841f52f) Therefore, I think it's more natural to target the types, not the props value, as the cause of this warning is actually the types: ![CleanShot 2025-05-14 at 12 18 00@2x](https://github.com/user-attachments/assets/0a5a64c8-1ac9-4b0f-8fe7-20e78db2acec) ![CleanShot 2025-05-14 at 12 17 53@2x](https://github.com/user-attachments/assets/72008c25-7d7b-46e4-8e2f-e52f01e50b80) x-ref: https://github.com/vercel/next.js/pull/79144#discussion_r2086941435 --------- Co-authored-by: Janka Uryga <lolzatu2@gmail.com>
Author
Parents
Loading