Code Monkey home page Code Monkey logo

tswow-types's Introduction

@tswow/types

A tool to generate complete and strict typescript definitions for World of Warcraft's Lua API, to assist in addon development.

Addon development for World of Warcraft is done in Lua and is notoriously difficult to debug. Official documentation has only recently been made available and is only accessible through the game client. This project aims to provide a complete and strict typescript definition of the Lua API, by analyzing Blizzard's embedded documentation and generating typescript definitions from it.

The types generated through this tool are meant to be used in conjunction with the TSWoW project. If you are simply looking for the types as an NPM package, you can always install @tswow/types directly. Be sure to read the versioning section below.

We aim to keep these types in sync with the game at all types, but their accuracy depends on Blizzard keeping their in-game documentation up to date.

A lack of updates to this repository does not necessarily mean that the types are out of date. We will only update this repository when we have made changes to the generator itself. If you want to be sure that you have the latest types, you can always run the generator yourself.

Versioning

While this project itself uses semver, the published definition packages do follow this system in a conventional manner. We follow the game's version, so that you know exactly which version of the game each package is compatible with. We then affix a build number to the end in the event of multiple releases for the same game version. Eg 10.5.1.1 would be the first build of the 10.5.1 version of the game documentation, while 10.5.1.2 would be the second build of the same version. Upon the game entering a new version, the build number is reset to 1.

Setup

Init submodules

$ git submodule update --init --recursive

Install dependencies

$ yarn

Usage

Generate typescript definitions, based on the documentation within wow-ui-source. Your definitions will be available in the dist directory.

$ yarn generate

Contributing

Contributions are welcome. Please open an issue or a pull request. If you have any crazy ideas, please open an issue first so no time is wasted.

Todo

  • Remove the dependency on the wow-ui-source submodule. Instead, store the path to the game files in a config file and extract the documentation from there.
  • Clean up the code and make it more readable.
  • Add more documentation to the code.
  • Build / publish scripts
  • CI
  • Mechanism to add our own documentation for functions that are not documented by Blizzard.
  • After the above, maybe we can scrape Wowpedia for the documentation of undocumented functions (with attribution), or at least add links to Wowpedia.
  • Tests
  • Set up husky and commitlint
  • Should we use objects instead of enums? Enums have two way mapping, but within wow, they don't
  • Figure out whether secure functions are simply not documented or if they have a flag.. or maybe they are documented without a flag. Maybe we can get this info from Wowpedia and mark those functions as @deprecated, not perfect but at least your IDE will warn you.

tswow-types's People

Contributors

ziao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.