Skip to content

Commit 819e41b

Browse files
committed
docs: fix button click parameter types
1 parent 713d166 commit 819e41b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It allows you to create things like this:
2424

2525
```tsx
2626
import { InSim } from 'node-insim';
27-
import { InSimFlags, IS_BTC, IS_MST, PacketType } from 'node-insim/packets';
27+
import { InSimFlags, InSimPacketInstance, IS_MST, PacketType } from 'node-insim/packets';
2828
import { StrictMode } from 'react';
2929
import {
3030
Button,
@@ -54,11 +54,11 @@ function App() {
5454
});
5555

5656
// Clickable buttons
57-
const handlePlayerClick = (plid: number) => (_: IS_BTC, inSim: InSim) => {
57+
const handlePlayerClick = (plid: number) => (_: InSimPacketInstance<PacketType.ISP_BTC>, inSim: InSim) => {
5858
inSim.send(new IS_MST({ Msg: `/echo PLID ${plid}` }));
5959
};
6060

61-
const handleConnectionClick = (ucid: number) => (_: IS_BTC, inSim: InSim) => {
61+
const handleConnectionClick = (ucid: number) => (_: InSimPacketInstance<PacketType.ISP_BTC>, inSim: InSim) => {
6262
inSim.send(new IS_MST({ Msg: `/echo UCID ${ucid}` }));
6363
};
6464

0 commit comments

Comments
 (0)