Skip to content

Commit

Permalink
Better name for MpdCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickthebold committed Jun 18, 2023
1 parent 6aabd92 commit 4893338
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/state.ts
Expand Up @@ -2,8 +2,8 @@ import { BrandString } from "./type-util";

export type State = {
status: PlayStatus;
sentCommands: MpdCommand[];
desiredCommands: MpdCommand[];
sentIntents: UserIntent[];
pendingIntents: UserIntent[];
responseData: string;
}

Expand All @@ -23,8 +23,6 @@ export type PlayStatus = {
currentTrack: SongId
}

// This is not literally what get's sent on the websocket, just a representation of
// something we need to tell the server.
export type MpdCommand = {type: 'pause'} | {type: 'stop'} | {type: 'next_track'} | {type: 'previous_track'} | {type: 'set_volume', volume: number}
export type UserIntent = {type: 'pause'} | {type: 'stop'} | {type: 'next_track'} | {type: 'previous_track'} | {type: 'set_volume', volume: number}

export type SongId = BrandString<'SongId'>

0 comments on commit 4893338

Please sign in to comment.