JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51
  • Score
    100M100P100Q46192F
  • License MIT

TypeScript definitions for Dota 2 Panorama API

Package Exports

  • panorama-types/transformer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (panorama-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Panorama Types

TypeScript definitions for Dota 2 Panorama API

Installation

Check out our addon template for usage examples.

  1. Get package from npm
yarn add -D panorama-types
# or
npm install -D panorama-types
  1. Modify your tsconfig.json
{
  "compilerOptions": {
    "types": ["panorama-types"]
  }
}

Enums

This package includes 2 versions of enum types - raw and normalized. Raw types are included by default, with "types": ["panorama-types"]. They match actual values available at runtime, however lead to repetition and require you to use inconsistent standard names.

Normalized enum types can be included with "types": ["panorama-types/normalized"] and require you to use panorama-types/transformer (for example using ttypescript). With these types, enums have consistent names and have no repeated parts. For example, instead of EDOTA_ModifyGold_Reason.DOTA_ModifyGold_Unspecified you have to write ModifyGoldReason.UNSPECIFIED.

Both type versions define aliases for alternative names, so libraries created with one version would be compatible with a different one.