1.0.25 • Published 4 months ago
codyfight-widget-ui-type v1.0.25
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:
- Clone the repository
- Run
npm install
- Update the
src/index.ts
file - Update the package version in
package.json
- Run
npm run build
- Run
npm publish
- 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
1.0.25
4 months ago
1.0.24
5 months ago
1.0.19
10 months ago
1.0.18
10 months ago
1.0.22
10 months ago
1.0.21
10 months ago
1.0.20
10 months ago
1.0.23
9 months ago
1.0.17
12 months ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.0
2 years ago