Last active
March 31, 2023 14:21
-
-
Save gordielachance/33d7f6759dbc4a47d2bc21f99431ad25 to your computer and use it in GitHub Desktop.
typescript JSPF tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
https://github.com/metabrainz/listenbrainz-server/blob/cdc4df46738402d7d003acf08febfe7c7cf2fe4f/frontend/js/src/utils/types.d.ts | |
export type URI = string; | |
export type URICollection = URI[]; | |
export type JSPFAttribution = Record<string,URI>; | |
export type JSPFAttributionCollection = JSPFAttribution[]; | |
export type JSPFLink = Record<URI,URI>; | |
export type JSPFLinkCollection = JSPFLink[]; | |
export type JSPFMeta = Record<URI,any>; | |
export type JSPFMetaCollection = JSPFMeta[]; | |
export type JSPFExtension = Record<URI,any>; | |
export type JSPFTrack{ | |
location?: URICollection, | |
identifier?: URICollection, | |
title?: string, | |
creator?: string, | |
annotation?: string, | |
info?: URI, | |
image?: URI, | |
album?: URI, | |
trackNum?: number,/*should be a non-negative integer*/ | |
duration?: number,/*should be a non-negative integer*/ | |
link?: JSPFLinkCollection, | |
meta?: JSPFMetaCollection, | |
extension?: JSPFExtension | |
}; | |
export type JSPFTrackCollection = JSPFTrack[]; | |
export type JSPFPlaylist{ | |
title?: string, | |
creator?: string, | |
annotation?: string, | |
info?: URI, | |
location?: URI, | |
identifier?: URI, | |
image?: URI, | |
date?: Date, /*DateTimeIso8601String*/, | |
license?: URI, | |
attribution?: JSPFAttributionCollection, | |
link?: JSPFLinkCollection, | |
meta?: JSPFMetaCollection, | |
extension?: JSPFExtension, | |
track?: JSPFTrack[] | |
}; | |
export type JSPFObject = { | |
playlist: JSPFPlaylist | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment