1.0.25 • Published 9 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-devor
yarn add codyfight-widget-ui-type -DUsage
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.tsfile - 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 loginMake 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 --latestor
npm update codyfight-widget-ui-type --latest1.0.25
9 months ago
1.0.24
10 months ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.23
1 year ago
1.0.17
1 year ago
1.0.16
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.9
2 years 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
3 years ago