@sendbird/uikit-react-native
Version:
Sendbird UIKit for React Native: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
63 lines (62 loc) • 2.69 kB
TypeScript
import type * as ExpoAudio from 'expo-audio';
import type * as ExpoAV from 'expo-av';
import type * as ExpoDocumentPicker from 'expo-document-picker';
import type * as ExpoFs from 'expo-file-system';
import type * as ExpoImagePicker from 'expo-image-picker';
import type * as ExpoVideo from 'expo-video';
import type { FilePickerResponse } from '../platform/types';
interface ExpoFileSystemLegacy {
documentDirectory: string | null;
cacheDirectory: string | null;
getInfoAsync(fileUri: string, options?: unknown): Promise<ExpoFs.FileInfo>;
downloadAsync(uri: string, fileUri: string, options?: unknown): Promise<{
uri: string;
}>;
}
interface ExpoDirectory {
uri: string;
}
interface ExpoFileSystemNew {
File: {
new (...uris: (string | unknown)[]): {
info(options?: unknown): ExpoFs.FileInfo;
};
downloadFileAsync(url: string, destination: unknown, options?: unknown): Promise<{
uri: string;
}>;
};
Directory: new (...uris: (string | unknown)[]) => ExpoDirectory;
Paths: {
document: ExpoDirectory;
cache: ExpoDirectory;
};
}
type ExpoFileSystemModule = ExpoFileSystemLegacy | ExpoFileSystemNew | typeof ExpoFs;
declare const expoBackwardUtils: {
imagePicker: {
isCanceled(result: ExpoImagePicker.ImagePickerResult): boolean;
toFilePickerResponses(result: ExpoImagePicker.ImagePickerResult, fsModule: typeof ExpoFs): Promise<FilePickerResponse[]>;
};
documentPicker: {
isCanceled(result: ExpoDocumentPicker.DocumentPickerResult): boolean;
toFilePickerResponses(result: ExpoDocumentPicker.DocumentPickerResult): Promise<FilePickerResponse[]>;
};
expoAV: {
isLegacyAVModule(module: ExpoAudioModule | ExpoVideoModule): module is typeof ExpoAV;
isAudioModule(module: ExpoAudioModule): module is typeof ExpoAudio;
isVideoModule(module: ExpoVideoModule): module is typeof ExpoVideo;
};
toFileSize(info: ExpoFs.FileInfo): number;
fileSystem: {
isLegacyModule(fsModule: ExpoFileSystemModule): fsModule is ExpoFileSystemLegacy;
getFileInfo(fsModule: ExpoFileSystemModule, uri: string): Promise<ExpoFs.FileInfo>;
getDocumentDirectory(fsModule: ExpoFileSystemModule): string | null;
getCacheDirectory(fsModule: ExpoFileSystemModule): string | null;
downloadFile(fsModule: ExpoFileSystemModule, url: string, localUri: string): Promise<{
uri: string;
}>;
};
};
export type ExpoAudioModule = typeof ExpoAV | typeof ExpoAudio;
export type ExpoVideoModule = typeof ExpoAV | typeof ExpoVideo;
export default expoBackwardUtils;