mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 01:57:29 +00:00
Improve typing of skin info
This commit is contained in:
parent
14168f85a5
commit
fb05e07767
1 changed files with 24 additions and 12 deletions
36
js/types.ts
36
js/types.ts
|
|
@ -3,20 +3,32 @@ type Skin = {
|
|||
name: string;
|
||||
};
|
||||
|
||||
type SkinImages = {
|
||||
|
||||
}
|
||||
|
||||
type Band = null; // TODO: Use a real type here.
|
||||
|
||||
// TODO: Use a type to ensure these keys mirror the CURSORS constant in
|
||||
// skinParser.js
|
||||
type Cursors = {[cursor: string]: string}
|
||||
|
||||
type GenLetterWidths = {[letter: string]: number};
|
||||
|
||||
// TODO: Use a type to ensure the keys are one of the known values in PLEDIT.txt
|
||||
type PlaylistStyle = {[state: string]: string};
|
||||
|
||||
// TODO: Type these keys.
|
||||
type SkinImages = {[sprite: string]: string};
|
||||
|
||||
// TODO: type these keys
|
||||
type SkinRegion = {[windowName: string]: string[]}
|
||||
|
||||
// TODO: Fill these out once we actually use them.
|
||||
type SkinData = {
|
||||
skinImages: SkinImages;
|
||||
skinColors: string[];
|
||||
skinPlaylistStyle: null;
|
||||
skinCursors: null;
|
||||
skinRegion: {};
|
||||
skinGenLetterWidths: null;
|
||||
skinPlaylistStyle: PlaylistStyle;
|
||||
skinCursors: Cursors;
|
||||
skinRegion: SkinRegion;
|
||||
skinGenLetterWidths: GenLetterWidths;
|
||||
}
|
||||
|
||||
export type Action =
|
||||
|
|
@ -162,15 +174,15 @@ export interface DisplayState {
|
|||
disableMarquee: boolean;
|
||||
marqueeStep: number;
|
||||
skinImages: SkinImages;
|
||||
skinCursors: null;
|
||||
skinRegion: {};
|
||||
skinGenLetterWidths: null;
|
||||
skinCursors: Cursors | null;
|
||||
skinRegion: SkinRegion;
|
||||
skinGenLetterWidths: GenLetterWidths | null;
|
||||
skinColors: string[]; // Theoretically this could be a tuple of a specific length
|
||||
skinPlaylistStyle: null;
|
||||
skinPlaylistStyle: PlaylistStyle | null;
|
||||
working: boolean;
|
||||
closed: boolean;
|
||||
loading: boolean;
|
||||
playlistScrollPosition: number;
|
||||
zIndex: number
|
||||
dummyVizData:null; // TODO: Figure out what kind of data this actually is.
|
||||
dummyVizData: null; // TODO: Figure out what kind of data this actually is.
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue