Add interfaces for each event's data
This commit is contained in:
parent
cfb915724f
commit
1063126164
12 changed files with 36 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const ChancellorNomination = (socket: Socket, data: any) => {
|
||||
export const ChancellorNomination = (socket: Socket, data: ChancellorNomination) => {
|
||||
console.log(`ChancellorNomination event`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const ChancellorPolicy = (socket: Socket, data: any) => {
|
||||
export const ChancellorPolicy = (socket: Socket, data: ChancellorPolicy) => {
|
||||
console.log(`Chancellor policy`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const PresidentPolicies = (socket: Socket, data: any) => {
|
||||
export const PresidentPolicies = (socket: Socket, data: PresidentPolicies) => {
|
||||
console.log(`Received Presidential policies`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const StartGame = (socket: Socket, data: any) => {
|
||||
export const StartGame = (socket: Socket, data: StartGame) => {
|
||||
console.log(`Game starting`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const VetoConfirm = (socket: Socket, data: any) => {
|
||||
export const VetoConfirm = (socket: Socket, data: VetoConfirm) => {
|
||||
console.log(`President's veto confirmation`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const VetoRequest = (socket: Socket, data: any) => {
|
||||
export const VetoRequest = (socket: Socket, data: VetoRequest) => {
|
||||
console.log(`Chancellor requesting veto`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const Vote = (socket: Socket, data: any) => {
|
||||
export const Vote = (socket: Socket, data: Vote) => {
|
||||
console.log(`Vote received`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const ExecutePlayer = (socket: Socket, data: any) => {
|
||||
export const ExecutePlayer = (socket: Socket, data: ExecutePlayer) => {
|
||||
console.log(`Killing a player`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const ExecutiveConfirmation = (socket: Socket, data: any) => {
|
||||
export const ExecutiveConfirmation = (socket: Socket, data: ExecutiveConfirmation) => {
|
||||
console.log(`Just a plain ole confirmation`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const InvestigateAffiliation = (socket: Socket, data: any) => {
|
||||
export const InvestigateAffiliation = (socket: Socket, data: InvestigateAffiliation) => {
|
||||
console.log(`Investigating a player`);
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Socket } from 'socket.io';
|
||||
export const NextPresident = (socket: Socket, data: any) => {
|
||||
export const NextPresident = (socket: Socket, data: NextPresident) => {
|
||||
console.log(`Choosing the Next President`);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue