Add moduleSuffixes to tsconfig (#11146)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -168,10 +168,14 @@ function createResizedImage(
|
||||
|
||||
export async function saveBytesToDisk(
|
||||
filename: string,
|
||||
bytes: Uint8Array<ArrayBuffer>,
|
||||
bytes: Uint8Array,
|
||||
type: string,
|
||||
) {
|
||||
const blob = new Blob([bytes], {type})
|
||||
/*
|
||||
* Bytes handed to us are never SharedArrayBuffer-backed, but the broader
|
||||
* Uint8Array parameter type matches the native variant.
|
||||
*/
|
||||
const blob = new Blob([bytes as Uint8Array<ArrayBuffer>], {type})
|
||||
const url = URL.createObjectURL(blob)
|
||||
downloadUrl(url, filename)
|
||||
// Firefox requires a small delay
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import {type ImagePickerOptions} from 'expo-image-picker'
|
||||
import {type OpenCropperOptions} from '@bsky.app/expo-image-crop-tool'
|
||||
|
||||
import {type PickerImage} from './picker.shared'
|
||||
import {type CameraOpts} from './types'
|
||||
|
||||
export {openPicker, openUnifiedPicker} from './picker.shared'
|
||||
|
||||
export async function openCamera(_opts: CameraOpts): Promise<PickerImage> {
|
||||
export async function openCamera(
|
||||
_opts: ImagePickerOptions,
|
||||
): Promise<PickerImage> {
|
||||
throw new Error('openCamera is not supported on web')
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,3 @@ export interface PickerOpts {
|
||||
multiple?: boolean
|
||||
maxFiles?: number
|
||||
}
|
||||
|
||||
export interface CameraOpts {
|
||||
width: number
|
||||
height: number
|
||||
freeStyleCropEnabled?: boolean
|
||||
cropperCircleOverlay?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user