mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Added information on using typings in typescript/readme.md
This commit is contained in:
parent
d28b0df855
commit
7b92abe5d5
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,18 @@ Please use TypeScript 1.4+
|
|||
- `phaser.d.ts` contains a reference to `pixi.d.ts` and `p2.d.ts` and so both these files must remain siblings in the same directory.
|
||||
- `pixi.d.ts` has deviated from the official project. If you are a pixi user, pick up the ball over at [the official pixi typescript repo](https://github.com/pixijs/pixi-typescript).
|
||||
|
||||
## Including typescript definitions in your project using Typings
|
||||
|
||||
You can now use typings, the TypeScript Definition Manager, to include Phaser's typescript definitions in your project:
|
||||
- Make sure that typings is installed in your system: `npm install -g typings`
|
||||
- Install phaser typescript definitions as a global dependency:
|
||||
```
|
||||
typings install github:photonstorm/phaser/typescript/typings.json -GD
|
||||
```
|
||||
|
||||
This will make phaser typescript definitions available for your compiler so that there is no need to reference them from your source files.
|
||||
For more information, check [the official typings site](https://github.com/typings/typings).
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you find any mistakes in these definitions or you feel they can be improved in any way, please make a pull request against the dev branch.
|
||||
|
|
Loading…
Reference in a new issue