You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix generated types base on __typetests__ (facebook#51317)
Summary:
This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData`
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74246304
Copy file name to clipboardExpand all lines: packages/react-native/Libraries/AppState/AppState.js
+6-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,12 @@ import NativeAppState from './NativeAppState';
22
22
* - @platform android - on another Activity (even if it was launched by your app)
23
23
* @platform ios - inactive - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
* see https://reactnative.dev/docs/accessibility#accessibilitystate
160
-
*/
161
-
'aria-busy'?: ?boolean,
162
-
'aria-checked'?: ?boolean|'mixed',
163
-
'aria-disabled'?: ?boolean,
164
-
'aria-expanded'?: ?boolean,
165
-
'aria-selected'?: ?boolean,
166
-
167
-
/**
168
-
* Represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
169
-
* This prop is listed for cross-platform reasons and has no real effect on Android or iOS.
170
-
*/
171
-
'aria-labelledby'?: ?string,
172
-
173
143
children?: ?React.Node,
174
144
175
145
/**
@@ -306,4 +276,5 @@ export type TextProps = $ReadOnly<{
0 commit comments