Skip to content

Commit

Permalink
Specify an argument type at events on template
Browse files Browse the repository at this point in the history
  • Loading branch information
spider-hand committed Jun 21, 2023
1 parent 56f51dc commit 7a5db01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/components/Home/CreateRoomDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:max="5"
:count="selectedSize"
:disabled="!isOwner"
@onChangeValue="(val) => $emit('onChangeSize', val)"
@onChangeValue="(val: number) => $emit('onChangeSize', val)"
/>
</div>
<div :class="$style['create-room-dialog__form']">
Expand Down Expand Up @@ -62,15 +62,15 @@
:max="10"
:count="selectedTime"
:disabled="!isOwner"
@onChangeValue="(val) => $emit('onChangeTime', val)"
@onChangeValue="(val: number) => $emit('onChangeTime', val)"
/>
</div>
<div :class="$style['create-room-dialog__form']">
<TextInput
label="Player Name"
name="player-name"
placeholder="Your Player Name"
@onChangeValue="(val) => $emit('onChangePlayerName', val)"
@onChangeValue="(val: string) => $emit('onChangePlayerName', val)"
/>
</div>
<div :class="$style['create-room-dialog__form']">
Expand All @@ -80,7 +80,7 @@
<MySpace />
<MySwitch
:ans="isOwner"
@onChangeValue="(val) => $emit('onChangeIsOwner', val)"
@onChangeValue="(val: boolean) => $emit('onChangeIsOwner', val)"
/>
</div>
<div :class="$style['create-room-dialog__form']">
Expand All @@ -90,7 +90,7 @@
placeholder="Room Number"
:disabled="isOwner"
:error-msg="roomCannnotBeFoundError"
@onChangeValue="(val) => emit('onChangeRoomNumber', val)"
@onChangeValue="(val: string) => emit('onChangeRoomNumber', val)"
/>
</div>
<div :class="$style['create-room-dialog__footer']">
Expand Down
4 changes: 2 additions & 2 deletions src/views/GameView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
:is-owner="gameSettingsState.isOwner"
:random-lat-lng="inGameState.randomLatLng"
:round="inGameState.round"
@updateRandomLatLng="(val) => saveRandomLatLng(val)"
@updateRandomLatLng="(val: google.maps.LatLng) => saveRandomLatLng(val)"
@savePanorama="savePanorama"
@saveStreetView="saveStreetView"
/>
Expand All @@ -63,7 +63,7 @@
:random-lat-lng="inGameState.randomLatLng"
:round="inGameState.round"
:is-make-guess-button-clicked="inGameState.isMakeGuessButtonClicked"
@updateSelectedLatLng="(val) => saveSelectedLatLng(val)"
@updateSelectedLatLng="(val: google.maps.LatLng) => saveSelectedLatLng(val)"
@onClickHideMapButton="saveIsMakeGuessButtonClicked(false)"
/>
<FlatButton
Expand Down

0 comments on commit 7a5db01

Please sign in to comment.