Add TypeScript support
Opened this issue · 2 comments
christopher-caldwell commented
I figure this will never happen, but in case anyone needed types, here is what works for me
declare module 'react-native-image-converter' {
interface ConvertArgs {
path: string
grayscale?: boolean
base64?: boolean
resizeRatio?: number
imageQuality?: number
}
interface ConvertResponse {
success: boolean
errorMsg: string
imageURI: string
base64String: string
}
type ConvertFunction = (params: ConvertArgs) => Promise<ConvertResponse>
const convert: ConvertFunction
export { convert }
}
euZebe commented
You can add it to https://definitelytyped.org/ :-)
christopher-caldwell commented
@euZebe Shouldn't the author do this? I didn't realize the community could submit types