This should no longer be used, you can now easily include js files with the allowJs setting in your tsconfig
##javascript-to-typscript
Utility to help migrate javascript apps to typescript.
$ npm install javascript-to-typescript
- from root of project
$ js-to-ts [OPTION] [PATH]
-p --startPath : starting path -f --filter : filter pattern -d --dryRun : dry run
- All commands should be run from the root of your project
- Running any of these commands will also install the following NPM packages
- Typescript
- Typings
$ js-to-ts
Before | After |
---|---|
|
|
#####Specific Directory
$ js-to-ts --startPath ./src
Before | After |
---|---|
|
|
#####Additional Filter
$ js-to-ts --filter '**/file1.js'
Before | After |
---|---|
|
|
$ js-to-ts -p ./src --dryRun
$ Files to Migrate: [
'src/file1.js',
'src/file2.js',
'module/file1.js',
'module/file2.js'
]