From 71aa36dacc65619097c51298e8909e495035c072 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 17 Sep 2018 08:32:52 -0700 Subject: [PATCH] Expand typeing of fileUtils --- js/fileUtils.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/js/fileUtils.ts b/js/fileUtils.ts index d33d265c..29d04848 100644 --- a/js/fileUtils.ts +++ b/js/fileUtils.ts @@ -1,8 +1,17 @@ import invariant from "invariant"; -export interface MediaTags {} +export interface MediaTags { + tags: { + artist: string; + title: string; + picture: { + data: number[]; + type: string; + }; + }; +} -type JsMediaTagsFile = string | ArrayBuffer; +type JsMediaTagsFile = string | ArrayBuffer | Blob; interface JsMediaTagsHandlers { onSuccess: (tags: MediaTags) => void; onError: (error: Error) => void; @@ -78,7 +87,7 @@ export async function genArrayBufferFromFileReference( } interface PromptForFileReferenceOptions { - accept?: string; + accept?: string | null; directory?: boolean; }