Types for config

This commit is contained in:
Jordan Eldredge 2018-09-17 08:32:52 -07:00
parent 2e6cf2d157
commit c2d5861c49

View file

@ -1,7 +1,18 @@
import { Track, AppState } from "./types";
// @ts-ignore
import llamaAudio from "../mp3/llama-2.91.mp3";
import { DeepPartial } from "redux";
interface Config {
initialTracks?: Track[];
audioUrl?: string | URL;
skinUrl?: string | URL;
disableMarquee?: boolean;
initialState?: DeepPartial<AppState>;
}
const { hash } = window.location;
let config = {};
let config: Config = {};
if (hash) {
try {
config = JSON.parse(decodeURIComponent(hash).slice(1));