Skip to content

Commit 47c7f86

Browse files
authored
fix typing to make outputPath actually accept null (#395)
* Update index.tsx change signature to match the docs / java/ objc code that say null is allowed to use the cache directory * Update NativeImageResizer.ts change types
1 parent 96721a2 commit 47c7f86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/NativeImageResizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface Spec extends TurboModule {
1111
mode: string,
1212
onlyScaleDown: boolean,
1313
rotation?: number,
14-
outputPath?: string,
14+
outputPath?: string | null,
1515
keepMeta?: boolean
1616
): Promise<{
1717
path: string;

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function createResizedImage(
2121
format: ResizeFormat,
2222
quality: number,
2323
rotation: number = 0,
24-
outputPath?: string,
24+
outputPath?: string | null,
2525
keepMeta = false,
2626
options: Options = defaultOptions
2727
): Promise<Response> {

0 commit comments

Comments
 (0)