'use strict'; import type { StyleProp } from 'react-native'; import type { AnyRecord, PlainStyle } from '../../common'; import type { CSSAnimationProperties } from './animation'; import type { CSSTransitionProperties } from './transition'; /* Style type properties (properties that extends StyleProp) can be defined with other property names than "style". For example `contentContainerStyle` in FlatList. Type definition for all style type properties should act similarly, hence we pick keys with 'Style' substring with the use of this utility type. */ type PickStyleProps

= Pick< P, { [K in keyof P]-?: K extends `${string}Style` | 'style' ? K : never; }[keyof P] >; export type CSSStyle = S & Partial> & Partial>; type CSSStyleProps

= { [K in keyof PickStyleProps

]: P[K] extends StyleProp ? U extends object ? StyleProp> : never : never; }; type RestProps

= { [K in keyof Omit>]: P[K]; }; export type CSSProps

= CSSStyleProps

& RestProps

;