next.js
9677c87e - Improve TypeScript plugin for server boundary (#63667)

Commit
1 year ago
Improve TypeScript plugin for server boundary (#63667) For problems like #62821, #62860 and other, the only way to improve the DX would be relying on the type checker to ensure that Server Actions are async functions. Inlined definitions will always be checked by SWC (as they're always syntactically defined as functions already), but export values are sometimes determined at the runtime. Also added `react-dom` related methods to the disallow list for the server layer. Examples: https://github.com/vercel/next.js/assets/3676859/ac0b12fa-829b-42a4-a4c6-e1c321b68a8e https://github.com/vercel/next.js/assets/3676859/2e2e3ab8-6743-4281-9783-30bd2a82fb5c https://github.com/vercel/next.js/assets/3676859/b61a4c0a-1ad4-4ad6-9d50-311ef3450e13 Closes NEXT-2913
Author
Parents
Loading