mediaPicker.MediaType
What the picker offers, 'images' or 'videos', named by the mediaTypes option.
Usage
Pick a photo and hand its local file to an upload function.
// Pick a photo and hand its local file to an upload function.
import { mediaPicker, type MediaAsset, type MediaType } from 'kuito';
export async function choosePhoto(upload: (asset: MediaAsset) => Promise<void>) {
const mediaTypes: MediaType[] = ['images'];
const result = await mediaPicker.pick({ mediaTypes });
if (!result.canceled && result.assets[0]) await upload(result.assets[0]);
}Type declaration
export type MediaType = PickerMediaType;Type
"images" | "videos"Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.