screepers / Screeps-Typescript-Declarations

The repository for *Screeps's* TypeScript type definitions.
69 stars 44 forks source link
screeps typescript

Screeps Typescript Declarations

The repository for Screep's TypeScript type definitions. https://screeps.com/

Discussion in screep's community forum

Installation

Using typings, add this to your typings.json:

{
  "globalDependencies": {
    "screeps": "github:screepers/Screeps-Typescript-Declarations/dist/screeps.d.ts"
  }
}

Usage

Note: When using this API, you can't access creeps in manner suggested in Screeps' tutorial:

Game.creeps.Worker1  // This is not allowed by TypeScript compiler

Instead, you have to use

Game.creeps['Worker1']

Contribute

This library will stay up to date only with the help of you! If active players don't update it, it'll get lost.

To update the declarations, edit the files in ./src folder.

To compile the declarations, run:

npm run compile

Changelog

v4.2.1 2016-07-25 ChangeLog

v4.2.0

v4.0.1

v4.0.0

v3.0.0 Change all usage of interface to class.

Please raise an issue if this break your code!

v2.1.0 2016-06-23 ChangeLog

v1.5.4 2016-04-04 Bug

Thanks Strategic-Link-Consulting

v1.5.3 2016-03-31 Bug

v1.5.2 2016-03-19 Bug

v1.5.1 2016-03-18 ChangeLog

v1.4.3 2016-03-18 Commited by NhanHo

v1.4.2 2016-03-10

v1.4.1 2016-03-10 ChangeLog

v1.3.2 2016-03-10 ChangeLog

v1.3.1 2016-02-25 PathFinder

v1.2.2 2016-02-08 ChangeLog

v1.1.7 2016-02-08

v1.1.5 2016-02-07

v1.1.3 2016-02-06

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT license.