Code Review Videos > JavaScript & TypeScript

[How I Fixed]: Warning: You provided a checked prop to a form field without an onChange handler.

Today’s error is likely going to make you want to kick yourself. I certainly felt like quite a wally after realising my mistake. But I do like to blog these as I hope that by doing so, I shame myself into remembering the solution in the future. OK, the error message: It doesn’t massively impact … Read more

Typing req.query In Express With TypeScript

If you’re using TypeScript with Express, you may well hit on TS2339: Property ‘whatever’ does not exist on type ‘RequestQuery’. It’s actually pretty easy to solve. Perhaps more frustrating than anything, as you may well have lots of examples of this problem, especially if migrating an older project from JavaScript, or less restrictive TypeScript, to … Read more

How I Fixed: error TS2551: Property ‘toEqual’ does not exist on type ‘Assertion’. Did you mean ‘equal’?

If you’re working with Cypress and Jest in the same project, TypeScript may throw errors that the standard Jest assertions are not valid types on the Assertion class. The error I get looks like this: Though in the IDE, even before running the tests, you will likely see something like this: This is a pretty … Read more

How I Fixed: We’ve found 2 Cypress configuration files named cypress.config.ts, cypress.config.js

If you’re using Cypress with TypeScript in your project, it’s possible you may encounter the following error message when trying to run Cypress: And how this looks in Cypress itself: The issue is fairly easy to resolve. Simply delete all the conflicting configuration files. In my case I wanted to keep cypress.config.ts, and so remove … Read more