native-fn
Version:
34 lines (28 loc) • 825 B
TypeScript
declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
installed: boolean;
name: Key;
module: Module;
Constants: Constants;
Errors: Errors;
}
declare enum MediaType {
Image = "image",
Video = "video",
Audio = "audio"
}
declare interface MediaInstance {
open(type: MediaType): void;
}
declare module 'native-fn' {
interface NativePlugins {
App: MediaInstance;
}
interface NativeConstants {
MediaType: MediaType;
}
interface NativeErrors {
}
}
declare const NativeMediaPlugin: NativePlugin<'Media', MediaInstance, {}, {}>;
export { NativeMediaPlugin as default };
export type { MediaInstance };