Because the code put in recipe functions is plain, native, mutable JavaScript code, Immer is naturally suited to be used in conjunction of TypeScript (or Flow).
In this lesson we will discover how to combine Immer with TypeScript, and how to type our data types both with simple types and with readonly types.
You could also do Readonly<User>
etc.