https://github.com/playerony/steps-for-porting-app-from-javascript-to-typescript
Steps for porting an application from javascript to typescript
https://github.com/playerony/steps-for-porting-app-from-javascript-to-typescript
instructions javascript settings setup steps typescript
Last synced: 3 months ago
JSON representation
Steps for porting an application from javascript to typescript
- Host: GitHub
- URL: https://github.com/playerony/steps-for-porting-app-from-javascript-to-typescript
- Owner: playerony
- Created: 2021-08-30T10:26:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-30T10:52:47.000Z (about 4 years ago)
- Last Synced: 2025-02-22T04:43:45.831Z (8 months ago)
- Topics: instructions, javascript, settings, setup, steps, typescript
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Steps for porting an application from javascript to typescript
# 1. Change file extensions and fixing broken tests
- ### Rename *.js to *.ts, allowing implicit any,
- ### Fix only things that are not type-checking, or causing compile errors,
- ### Get tests passing again,# 2. Explicit any
- ### "noImplicitAny": true,
- ### Where possible, provide a specific and appropriate type,
- ### Get tests passing again,# 3. Enable strict mode
- ### "strict": true,
- ### "strictNullChecks": true,
- ### "strictFunctionTypes": true,
- ### "strictBindCallApply": true,
- ### "strictPropertyInitialization": true,
- ### Replace explicit anys with more appropriate types,
- ### Try to avoid unsafe casts,