Skip to content

Commit 299b134

Browse files
committed
fix typings
1 parent 091c846 commit 299b134

File tree

7 files changed

+24
-39
lines changed

7 files changed

+24
-39
lines changed

generatedTypes/components/avatar/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ export declare type AvatarProps = {
5252
* Listener-callback for when an image's (uri) loading
5353
* starts (equiv. to Image.onLoadStart()).
5454
*/
55-
onImageLoadStart?: ImagePropsBase["onLoadStart"];
55+
onImageLoadStart?: ImagePropsBase['onLoadStart'];
5656
/**
5757
* Listener-callback for when an image's (uri) loading
5858
* either succeeds or fails (equiv. to Image.onLoadEnd()).
5959
*/
60-
onImageLoadEnd?: ImagePropsBase["onLoadEnd"];
60+
onImageLoadEnd?: ImagePropsBase['onLoadEnd'];
6161
/**
6262
* Listener-callback for when an image's (uri) loading
6363
* fails (equiv. to Image.onError()).
6464
*/
65-
onImageLoadError?: ImagePropsBase["onError"];
65+
onImageLoadError?: ImagePropsBase['onError'];
6666
/**
6767
* Label that can represent initials
6868
*/

generatedTypes/components/button/index.d.ts

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export declare enum ButtonSize {
99
medium = "medium",
1010
large = "large"
1111
}
12-
export declare enum AnimationDirection {
12+
export declare enum ButtonAnimationDirection {
1313
center = "center",
1414
left = "left",
1515
right = "right"
@@ -124,7 +124,7 @@ export declare type ButtonProps = TouchableOpacityProps & TypographyModifiers &
124124
/**
125125
* the direction of the animation ('left' and 'right' will effect the button's own alignment)
126126
*/
127-
animateTo?: AnimationDirection;
127+
animateTo?: ButtonAnimationDirection;
128128
};
129129
export declare type ButtonPropTypes = ButtonProps;
130130
export declare type ButtonState = {
@@ -147,7 +147,7 @@ declare class Button extends PureComponent<Props, ButtonState> {
147147
iconOnRight: boolean;
148148
};
149149
static sizes: typeof ButtonSize;
150-
static animationDirection: typeof AnimationDirection;
150+
static animationDirection: typeof ButtonAnimationDirection;
151151
constructor(props: Props);
152152
state: {
153153
size: undefined;
@@ -345,9 +345,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
345345
trailing: boolean;
346346
} | undefined;
347347
activeBackgroundColor?: string | undefined;
348-
useNative?: boolean | undefined; /**
349-
* Text to show inside the button
350-
*/
348+
useNative?: boolean | undefined;
351349
customValue?: any;
352350
style?: false | {} | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | {
353351
backfaceVisibility?: "visible" | "hidden" | import("react-native").Animated.Value | import("react-native").Animated.AnimatedInterpolation | undefined;
@@ -645,7 +643,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
645643
/**
646644
* the direction of the animation ('left' and 'right' will effect the button's own alignment)
647645
*/
648-
animateTo?: AnimationDirection | undefined;
646+
animateTo?: ButtonAnimationDirection | undefined;
649647
} & {
650648
useCustomTheme?: boolean | undefined;
651649
}) | (Pick<import("react-native").TouchableOpacityProps, "testID" | "onLayout" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "activeOpacity" | "onLongPress" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled"> & Partial<Record<import("../../commons/modifiers").AlignmentLiterals, boolean>> & Partial<Record<import("../../commons/modifiers").PositionLiterals, boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"flex" | "flexG" | "flexS", boolean>> & Partial<Record<"br0" | "br10" | "br20" | "br30" | "br40" | "br50" | "br60" | "br100", boolean>> & Partial<Record<"bg", boolean>> & {
@@ -656,9 +654,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
656654
trailing: boolean;
657655
} | undefined;
658656
activeBackgroundColor?: string | undefined;
659-
useNative?: boolean | undefined; /**
660-
* Text to show inside the button
661-
*/
657+
useNative?: boolean | undefined;
662658
customValue?: any;
663659
style?: false | {} | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | {
664660
backfaceVisibility?: "visible" | "hidden" | import("react-native").Animated.Value | import("react-native").Animated.AnimatedInterpolation | undefined;
@@ -956,7 +952,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
956952
/**
957953
* the direction of the animation ('left' and 'right' will effect the button's own alignment)
958954
*/
959-
animateTo?: AnimationDirection | undefined;
955+
animateTo?: ButtonAnimationDirection | undefined;
960956
} & {
961957
useCustomTheme?: boolean | undefined;
962958
}) | (Pick<import("react-native").TouchableOpacityProps, "testID" | "onLayout" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "activeOpacity" | "onLongPress" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled"> & Partial<Record<import("../../commons/modifiers").AlignmentLiterals, boolean>> & Partial<Record<import("../../commons/modifiers").PositionLiterals, boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"flex" | "flexG" | "flexS", boolean>> & Partial<Record<"br0" | "br10" | "br20" | "br30" | "br40" | "br50" | "br60" | "br100", boolean>> & Partial<Record<"bg", boolean>> & {
@@ -967,9 +963,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
967963
trailing: boolean;
968964
} | undefined;
969965
activeBackgroundColor?: string | undefined;
970-
useNative?: boolean | undefined; /**
971-
* Text to show inside the button
972-
*/
966+
useNative?: boolean | undefined;
973967
customValue?: any;
974968
style?: false | {} | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | {
975969
backfaceVisibility?: "visible" | "hidden" | import("react-native").Animated.Value | import("react-native").Animated.AnimatedInterpolation | undefined;
@@ -1267,7 +1261,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
12671261
/**
12681262
* the direction of the animation ('left' and 'right' will effect the button's own alignment)
12691263
*/
1270-
animateTo?: AnimationDirection | undefined;
1264+
animateTo?: ButtonAnimationDirection | undefined;
12711265
} & {
12721266
useCustomTheme?: boolean | undefined;
12731267
}) | (Pick<import("react-native").TouchableOpacityProps, "testID" | "onLayout" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "activeOpacity" | "onLongPress" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled"> & Partial<Record<import("../../commons/modifiers").AlignmentLiterals, boolean>> & Partial<Record<import("../../commons/modifiers").PositionLiterals, boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"flex" | "flexG" | "flexS", boolean>> & Partial<Record<"br0" | "br10" | "br20" | "br30" | "br40" | "br50" | "br60" | "br100", boolean>> & Partial<Record<"bg", boolean>> & {
@@ -1278,9 +1272,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
12781272
trailing: boolean;
12791273
} | undefined;
12801274
activeBackgroundColor?: string | undefined;
1281-
useNative?: boolean | undefined; /**
1282-
* Text to show inside the button
1283-
*/
1275+
useNative?: boolean | undefined;
12841276
customValue?: any;
12851277
style?: false | {} | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | {
12861278
backfaceVisibility?: "visible" | "hidden" | import("react-native").Animated.Value | import("react-native").Animated.AnimatedInterpolation | undefined;
@@ -1578,7 +1570,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
15781570
/**
15791571
* the direction of the animation ('left' and 'right' will effect the button's own alignment)
15801572
*/
1581-
animateTo?: AnimationDirection | undefined;
1573+
animateTo?: ButtonAnimationDirection | undefined;
15821574
} & {
15831575
useCustomTheme?: boolean | undefined;
15841576
}), any> & typeof Button;

generatedTypes/components/carousel/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React, { Component, RefObject, ReactNode, Key } from 'react';
22
import { ScrollView, LayoutChangeEvent, NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
33
import { CarouselProps, CarouselState, PageControlPosition } from './types';
44
export { CarouselProps };
5-
interface DefaultProps extends Partial<CarouselProps> {
6-
}
5+
declare type DefaultProps = Partial<CarouselProps>;
76
/**
87
* @description: Carousel for scrolling pages horizontally
98
* @gif: https://media.giphy.com/media/l0HU7f8gjpRlMRhKw/giphy.gif, https://media.giphy.com/media/3oFzmcjX9OhpyckhcQ/giphy.gif

generatedTypes/components/tabController/TabBarItem.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { PureComponent } from 'react';
22
import { TextStyle, LayoutRectangle, LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
33
import _ from 'lodash';
44
import Reanimated from 'react-native-reanimated';
5-
import Animated from 'react-native-reanimated';
65
import { State } from 'react-native-gesture-handler';
76
import { BadgeProps } from '../../components/badge';
87
export interface TabControllerItemProps {
@@ -86,7 +85,7 @@ interface Props extends TabControllerItemProps {
8685
index: number;
8786
targetPage: any;
8887
state: State;
89-
currentPage: Animated.Adaptable<number>;
88+
currentPage: Reanimated.Adaptable<number>;
9089
onLayout: (layout: Partial<LayoutRectangle>, index: number) => void;
9190
}
9291
/**

generatedTypes/components/text/index.d.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ declare const _default: React.ComponentClass<(RNTextProps & import("../../common
7171
animated?: boolean | undefined;
7272
textAlign?: string | undefined;
7373
} & {
74-
useCustomTheme?: boolean | undefined; /**
75-
* whether to center the text (using textAlign)
76-
*/
74+
useCustomTheme?: boolean | undefined;
7775
}) | (RNTextProps & import("../../commons/modifiers").CustomModifier & Partial<Record<"black" | "white" | "dark10" | "dark20" | "dark30" | "dark40" | "dark50" | "dark60" | "dark70" | "dark80" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
7876
/**
7977
* color of the text
@@ -101,9 +99,7 @@ declare const _default: React.ComponentClass<(RNTextProps & import("../../common
10199
animated?: boolean | undefined;
102100
textAlign?: string | undefined;
103101
} & {
104-
useCustomTheme?: boolean | undefined; /**
105-
* whether to center the text (using textAlign)
106-
*/
102+
useCustomTheme?: boolean | undefined;
107103
}) | (RNTextProps & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & import("../../commons/modifiers").CustomModifier & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
108104
/**
109105
* color of the text
@@ -131,9 +127,7 @@ declare const _default: React.ComponentClass<(RNTextProps & import("../../common
131127
animated?: boolean | undefined;
132128
textAlign?: string | undefined;
133129
} & {
134-
useCustomTheme?: boolean | undefined; /**
135-
* whether to center the text (using textAlign)
136-
*/
130+
useCustomTheme?: boolean | undefined;
137131
}) | (RNTextProps & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & Partial<Record<"black" | "white" | "dark10" | "dark20" | "dark30" | "dark40" | "dark50" | "dark60" | "dark70" | "dark80" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
138132
/**
139133
* color of the text
@@ -161,8 +155,6 @@ declare const _default: React.ComponentClass<(RNTextProps & import("../../common
161155
animated?: boolean | undefined;
162156
textAlign?: string | undefined;
163157
} & {
164-
useCustomTheme?: boolean | undefined; /**
165-
* whether to center the text (using textAlign)
166-
*/
158+
useCustomTheme?: boolean | undefined;
167159
}), any>;
168160
export default _default;

generatedTypes/components/view/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export interface ViewProps extends Omit<RNViewProps, 'style'>, ContainerModifier
3434
}
3535
export declare type ViewPropTypes = ViewProps;
3636
declare const _default: React.ComponentClass<ViewProps & {
37-
useCustomTheme?: boolean | undefined;
37+
useCustomTheme?: boolean | undefined; /**
38+
* Use Animate.View as a container
39+
*/
3840
}, any>;
3941
export default _default;

src/components/badge/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ class Badge extends PureComponent<BadgeProps> {
279279
style={containerStyle}
280280
{...others}
281281
backgroundColor={undefined}
282+
// @ts-expect-error
282283
borderWidth={undefined}
283284
{...this.getAccessibilityProps()}
284285
>

0 commit comments

Comments
 (0)