7.35.0 • Published 5 months ago

@mobilc/panorama-types v7.35.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Panorama Types

TypeScript definitions for Dota 2 Panorama API npm标签

Installation

Check out our addon template for usage examples.

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

Enums

This package includes 2 versions of enum types - raw and normalized. Raw types are included by default, with "types": ["@mobilc/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": ["@mobilc/panorama-types/normalized"] and require you to use @mobilc/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.

7.35.0

5 months ago

7.34.7

5 months ago

7.34.6

6 months ago

7.34.5

6 months ago

7.34.4

6 months ago

7.34.3

8 months ago

7.34.2

8 months ago

7.34.1

8 months ago

7.33.0

8 months ago

7.34.0

8 months ago