5 ms·
If you use the standard typescript linter, it will fail if you pass a Promise to an if statement. https://typescript-eslint.io/rules/no-misused-promises/ https
by jwolfe 11mo ago
If you use the standard typescript linter, it will fail if you pass a Promise to an if statement.
https://typescript-eslint.io/rules/no-misused-promises/ https://typescript-eslint.io/rules/no-misused-promises/
- b_e_n_t_o_n 11mo agoThe problem was the framework's bundler was transforming those functions to return promises, a linter would need to understand next.js's specific transforms to catch this.