Skip to content

Commit

Permalink
Temporarily back out ImageLoaderModule type extraction (#41547)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #41547

# Changelog:
[Internal]-

Pending figuring out why it might break backwards compatibility (which it shouldn't, in practice).

Reviewed By: GijsWeterings

Differential Revision: D51447646

fbshipit-source-id: c3a4511badc6c1346655f3a1a20050ad719b095b
  • Loading branch information
rshest authored and facebook-github-bot committed Nov 18, 2023
1 parent 73411f4 commit 917fd25
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions packages/react-native/Libraries/Image/NativeImageLoaderAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ import type {TurboModule} from '../TurboModule/RCTExport';

import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';

export type ImageSize = {|
width: number,
height: number,
|};

export interface Spec extends TurboModule {
+abortRequest: (requestId: number) => void;
+getConstants: () => {||};
+getSize: (uri: string) => Promise<ImageSize>;
+getSizeWithHeaders: (uri: string, headers: Object) => Promise<ImageSize>;
+getSize: (uri: string) => Promise<
$ReadOnly<{
width: number,
height: number,
...
}>,
>;
+getSizeWithHeaders: (
uri: string,
headers: Object,
) => Promise<{
width: number,
height: number,
...
}>;
+prefetchImage: (uri: string, requestId: number) => Promise<boolean>;
+queryCache: (uris: Array<string>) => Promise<Object>;
}
Expand Down

0 comments on commit 917fd25

Please sign in to comment.