mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Update README.md
This commit is contained in:
parent
49c2f106b5
commit
db563f9caf
1 changed files with 5 additions and 8 deletions
13
README.md
13
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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue