Convert react javascript project to typescript - one file at a time!

preview_player
Показать описание
How to convert a javascript react js project into typescript.
(Note: copy/paste text for command line is below in this description)

Have a huge legacy ReactJS project that you want to sprinkle typescript into, without having to convert the whole codebase?

This video shows how I actually did this, and is easy for you to do too.

Here are some of the text that I used in this video for easy copy/pasting:
npm install --save typescript @types/node @types/react @types/react-dom @types/jest

yarn add typescript @types/node @types/react @types/react-dom @types/jest

npx tsc --init

declare module 'src/history';
@typescript-eslint/parser
Рекомендации по теме
Комментарии
Автор

The zoom is great I can see everything perfectly on my flip phone!

Casanova_
Автор

I appreciate the zoom level. Great for watching on a phone screen!

MasterForm
Автор

this is what I was looking for, many thanks

upendrasingh-eofx
Автор

Thanks a lot man i was struggling with this

swaap
Автор

I'm here to talk about the zoom level. Zoom zoom, creator

michaelyabut
Автор

im using ipad the zoom is good but bad

BiggieBigM
Автор

Great video man, thanks for sharing. I would just suggest you zoom out a bit.

dsein