From c2d5861c490488644688d627e094e22291ed14fa Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 17 Sep 2018 08:32:52 -0700 Subject: [PATCH] Types for config --- js/{config.js => config.ts} | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) rename js/{config.js => config.ts} (92%) diff --git a/js/config.js b/js/config.ts similarity index 92% rename from js/config.js rename to js/config.ts index fd858669..1c41b153 100644 --- a/js/config.js +++ b/js/config.ts @@ -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; +} const { hash } = window.location; -let config = {}; +let config: Config = {}; if (hash) { try { config = JSON.parse(decodeURIComponent(hash).slice(1));