codyfight-widget-ui-type
TypeScript icon, indicating that this package has built-in type declarations

1.0.25 • Public • Published

codyfight-widget-ui-type

Description

Types declaration file for Widget -> UI events payload.

https://www.npmjs.com/package/codyfight-widget-ui-type

Installation

This package can be installed via npm or yarn:

npm install codyfight-widget-ui-type --save-dev

or

yarn add codyfight-widget-ui-type -D

Usage

import type { GameConfigEvent, GameState } from "codyfight-widget-ui-type";

// Example usage of exported types

function handleGameState(event: GameState) {
  // Do something with event.detail.value
}

function handleGameConfig(event: GameConfigEvent) {
  // Do something with event.detail.value.toggleSound
}

Updating types

In order to update the types, follow these steps:

  1. Clone the repository
  2. Run npm install
  3. Update the src/index.ts file
  4. Update the package version in package.json
  5. Run npm run build
  6. Run npm publish
  7. Commit and push the changes

Make sure to log in to npm before publishing the package:

npm login

Make sure to always have the latest version of the package installed in your project:

{
  "devDependencies": {
    "codyfight-widget-ui-type": "^1.0.0"
  }
}
yarn upgrade codyfight-widget-ui-type --latest

or

npm update codyfight-widget-ui-type --latest

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.253latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.253
1.0.241
1.0.230
1.0.220
1.0.210
1.0.200
1.0.191
1.0.181
1.0.172
1.0.160
1.0.150
1.0.140
1.0.130
1.0.121
1.0.111
1.0.100
1.0.90
1.0.81
1.0.70
1.0.60
1.0.50
1.0.40
1.0.31
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i codyfight-widget-ui-type

Weekly Downloads

12

Version

1.0.25

License

ISC

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • vinimartdev
  • driule
  • tomas.balsys