Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 436 Bytes

Converting Classes from JavaScript to TypeScript.md

File metadata and controls

15 lines (12 loc) · 436 Bytes

Converting Classes from JavaScript to TypeScript

Converting classes from JavaScript to TypeScript tends to be one of the more painful parts of conversions, since classes in TypeScript need to have member properties declared.

TypeStat provides a feature to infer and add those properties. Use fixes.missingProperties to apply those mutations across all files:

{
    "fixes": {
        "missingProperties": true
    }
}