@laplace.live/event-bridge-sdk 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +1 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -21,7 +21,6 @@ bun add @laplace.live/event-bridge-sdk
21
21
 
22
22
  ```typescript
23
23
  import { LaplaceEventBridgeClient } from '@laplace.live/event-bridge-sdk'
24
- import type { Message, System } from '@laplace.live/event-types'
25
24
 
26
25
  // Create a new client
27
26
  const client = new LaplaceEventBridgeClient({
@@ -33,15 +32,11 @@ const client = new LaplaceEventBridgeClient({
33
32
  // Connect to the bridge
34
33
  await client.connect()
35
34
 
36
- // Event types are automatically inferred from the event type string!
37
35
  client.on('message', event => {
38
- // TypeScript knows 'event' is of type 'Message' here
39
36
  console.log(`${event.username}: ${event.message}`)
40
37
  })
41
38
 
42
- // No need for explicit type parameters
43
39
  client.on('system', event => {
44
- // TypeScript knows 'event' is of type 'System' here
45
40
  console.log(`System: ${event.message}`)
46
41
  })
47
42
 
@@ -104,7 +99,7 @@ client.on('gift', event => {
104
99
 
105
100
  ## Event Types
106
101
 
107
- Event types are imported from `@laplace.live/event-types` package. See the [documentation](https://chat.laplace.live/event-types/index.html) for available event types.
102
+ Event types are imported from `@laplace.live/event-types` package. See the [documentation](https://chat.laplace.live/event-types) for available event types.
108
103
 
109
104
  ## License
110
105
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@laplace.live/event-bridge-sdk",
3
3
  "description": "LAPLACE Event Bridge SDK",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "module": "index.ts",
6
6
  "license": "MIT",
7
7
  "type": "module",