mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Types for config
This commit is contained in:
parent
2e6cf2d157
commit
c2d5861c49
1 changed files with 12 additions and 1 deletions
|
|
@ -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));
|
||||
Loading…
Add table
Add a link
Reference in a new issue