Skip to content

Commit 42ca46b

Browse files
okwasniewskifacebook-github-bot
authored andcommitted
fix: add ImageSource type to TypeScript (#51969)
Summary: This PR adds ImageSource type to ImageSource.d.ts which is defined in Flow: https://github.com/facebook/react-native/blob/d6f29c8afd14b2cc835649db3c59ed2f0e685331/packages/react-native/Libraries/Image/ImageSource.js#L87-L90 But not in the TypeScript file. ## Changelog: [GENERAL] [FIXED] - add ImageSource type to TypeScript Pull Request resolved: #51969 Test Plan: CI Green Reviewed By: fabriziocucci Differential Revision: D76532377 Pulled By: Abbondanzo fbshipit-source-id: f1bbcd3b3fc07bb0f7e82f81ebaffedf9bc06148
1 parent fb1a4d7 commit 42ca46b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-native/Libraries/Image/ImageSource.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@ export interface ImageURISource {
7272
}
7373

7474
export type ImageRequireSource = number;
75+
76+
export type ImageSource =
77+
| ImageRequireSource
78+
| ImageURISource
79+
| ReadonlyArray<ImageURISource>;

0 commit comments

Comments
 (0)