add a little tester

This commit is contained in:
Hailey
2024-07-29 16:01:38 -07:00
parent f68114bd47
commit cdbec848b7
4 changed files with 19 additions and 4 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import * as HLSDownload from './src/HLSDownload'
import * as Referrer from './src/Referrer'
import * as SharedPrefs from './src/SharedPrefs'
export {Referrer, SharedPrefs}
export {HLSDownload, Referrer, SharedPrefs}
@@ -9,7 +9,7 @@ import ExpoModulesCore
class ExpoHLSDownloadModule: Module {
public func definition() -> ModuleDefinition {
Name("ExpoHLSDownloadModule")
Name("ExpoHLSDownload")
AsyncFunction("downloadAsync") { (sourceUrl: URL, progressCb: JavaScriptFunction<Void>, promise: Promise) in
let hlsDownload = HLSDownload(sourceUrl: sourceUrl)
@@ -1,12 +1,12 @@
import {NotImplementedError} from '../NotImplemented'
export function downloadAsync(
export async function downloadAsync(
sourceUrl: string,
progressCb: (progress: number) => void,
): Promise<string> {
throw new NotImplementedError({sourceUrl, progressCb})
}
export function cancelAsync(sourceUrl: string): Promise<void> {
export async function cancelAsync(sourceUrl: string): Promise<void> {
throw new NotImplementedError({sourceUrl})
}