mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
42b3ab350f
Summary: circleci analyze_code errors: https://app.circleci.com/pipelines/github/facebook/react-native/16638/workflows/76804803-ceb5-4fb3-bd24-26bbb9826827/jobs/321696 - __Image.flow and Image.ios:__ requires needed to be sorted alphabetically - __error-utils-test.js:__ duplicate describe block title is used, i believe this was a typo Changelog: [Internal][Fixed] - fix circleci:analyze_code errors Reviewed By: lunaleaps Differential Revision: D40491001 fbshipit-source-id: a1df6ded77374f92e297d0a8866a2c4096e1196a
65 lines
1.7 KiB
JavaScript
65 lines
1.7 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
import type {RootTag} from '../Types/RootTagTypes';
|
|
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
|
import type {ImageProps as ImagePropsType} from './ImageProps';
|
|
|
|
import ImageViewNativeComponent from './ImageViewNativeComponent';
|
|
import TextInlineImageNativeComponent from './TextInlineImageNativeComponent';
|
|
import * as React from 'react';
|
|
|
|
type ImageComponentStaticsIOS = $ReadOnly<{|
|
|
getSize: (
|
|
uri: string,
|
|
success: (width: number, height: number) => void,
|
|
failure?: (error: any) => void,
|
|
) => void,
|
|
|
|
getSizeWithHeaders(
|
|
uri: string,
|
|
headers: {[string]: string, ...},
|
|
success: (width: number, height: number) => void,
|
|
failure?: (error: any) => void,
|
|
): any,
|
|
|
|
prefetch(url: string): any,
|
|
|
|
prefetchWithMetadata(
|
|
url: string,
|
|
queryRootName: string,
|
|
rootTag?: ?RootTag,
|
|
): any,
|
|
|
|
queryCache(
|
|
urls: Array<string>,
|
|
): Promise<{[string]: 'memory' | 'disk' | 'disk/memory', ...}>,
|
|
|
|
resolveAssetSource(source: any): ?ResolvedAssetSource,
|
|
|}>;
|
|
|
|
type ImageComponentStaticsAndroid = {
|
|
...ImageComponentStaticsIOS,
|
|
abortPrefetch(requestId: number): void,
|
|
};
|
|
|
|
export type ImageAndroid = React.AbstractComponent<
|
|
ImagePropsType,
|
|
| React.ElementRef<typeof TextInlineImageNativeComponent>
|
|
| React.ElementRef<typeof ImageViewNativeComponent>,
|
|
> &
|
|
ImageComponentStaticsAndroid;
|
|
|
|
export type ImageIOS = React.AbstractComponent<
|
|
ImagePropsType,
|
|
React.ElementRef<typeof ImageViewNativeComponent>,
|
|
> &
|
|
ImageComponentStaticsIOS;
|