diff --git a/README.md b/README.md index 95d751d41..bf3dada41 100644 --- a/README.md +++ b/README.md @@ -147,20 +147,17 @@ The documentation for Phaser 3 is an on-going project. Please help us by contrib ### TypeScript Definitions -The [TypeScript definitions](https://github.com/photonstorm/phaser/tree/master/types) can be found inside the `types` folder. They are also referenced in the types entry in `package.json`. +The [TypeScript definitions](https://github.com/photonstorm/phaser/tree/master/types) can be found inside the `types` folder. They are also referenced in the `types` entry in `package.json`. Depending on your project, you may need to add the following to your `tsconfig.json` file: ```json -"typeRoots": [ - "./node_modules/phaser/types" -], -"types": [ - "Phaser" -] +"lib": ["es6", "dom", "dom.iterable", "scripthost"], +"typeRoots": ["./node_modules/phaser/types"], +"types": ["Phaser"] ``` -We recently published a new [Phaser 3 TypeScript Project Template](https://github.com/photonstorm/phaser3-typescript-project-template), which you can use to get started with if you like. +We recently published a new [Phaser 3 TypeScript Project Template](https://github.com/photonstorm/phaser3-typescript-project-template), which you can use to get started with. The TS defs are automatically generated from the JSDoc comments found in the Phaser source code. If you wish to help refine them then you must edit the Phaser JSDoc blocks directly, not the defs file. You can find more details about the parser we built in the `scripts/tsgen` folder.