Recently, the hotel search company http://trivago.com migrated its core website, along with over 50 other Trivago domains, https://thenewstack.io/from-php-to-next-js-what-trivago-learned-rewriting-its-web-app/. The final version of this mid-to-large scale project includes 200,000 lines of code spread across 2,600.ts files and 115,000 lines of code spread across 1,500.tsx files.

Once the adaptation process was finished, Trivago’s engineers found that “TypeScript gives you a lot of confidence in your code,” explained Bartel.

Trivago auto-generated TypeScript type definitions by leveraging the https://thenewstack.io/decoupling-frontends-and-backends-with-graphql/ they were already using in their legacy code.

Two common problems missed during type casting are: Missing Fields: This takes place when the hand-written type as a field that doesn’t exist in the schema.

Related Articles