How create new project with extension .ts file ? like create-react-app --typescript ? I don’t want create project use js file
Here is one repo with TypeScript.
You can use it, contribute to it or learn from it.
Basically all you need is to install TypeScript, add tsconfig.json file to project and rename existing files from .js to .ts. Pure JS is valid TS too so there should be no problems.
Little bit more how to setup TS:
- adonis new yardstick
- install repo above ?
- rename all file .js in project to .ts. Like server.ts in root folder ?
Do you try install repo above ? it has many errors.
Sorry I think I linked wrong project.
The one I linked has only types, but I wanted to link this:
Quick start Adonis project with TS (by same dude / dudette)
- Install Adonis (or use repo above)
- Rename .js files to .ts
- Setup tsconfig.json
- In production run Adonis from compiled / output folder
Humm… Perhaps we need config manything when we install repo above, mistake manything in Tslint. But, thanks you.
May be i need leave Adonis typescript, because it not success.
Wait until AdonisJs version 5 is released instead of struggling with things you can avoid for now. The best fight you can do is the one you can avoid.
OK you right.