Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Vector, HashMap, Option } from 'prelude-ts'
import { Result, Failure } from 'runtypes'
import {
Message,
TrackInfo,
InfoMessage,
StatusType,
VolumeMessage
} from './Models'
import { failure, success, mapSuccess } from './Util'
const statusCodes: HashMap = HashMap.of(
['111', 'playing'],
['112', 'stopped'],
['113', 'paused'],
['222', 'volumeChange'],
['999', 'info']
)
const trackInfoKeys: (keyof TrackInfo)[] = [
'status',
'secondsPlayed',
'codec',
'bitrate',
'artist',
'album',
'date',
'genre',