Skip to content

Commit b2981c1

Browse files
committed
fix: updated typescript
1 parent 5ae8f07 commit b2981c1

File tree

17 files changed

+55
-51
lines changed

17 files changed

+55
-51
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"release-it": "^13.5.8",
9090
"rollup": "^2.34.1",
9191
"rollup-plugin-flow": "^1.1.1",
92-
"typescript": "4.2",
92+
"typescript": "4.6",
9393
"visualize-bundle": "^1.4.0"
9494
},
9595
"peerDependencies": {
@@ -182,7 +182,6 @@
182182
"@react-native-aria/combobox": "^0.2.4-alpha.0",
183183
"@react-native-aria/focus": "^0.2.4",
184184
"@react-native-aria/interactions": "^0.2.2",
185-
"@react-native-aria/listbox": "0.2.4-alpha.3",
186185
"@react-native-aria/overlays": "0.3.3-rc.0",
187186
"@react-native-aria/radio": "^0.2.4",
188187
"@react-native-aria/slider": "^0.2.5-alpha.1",

src/components/basic/StatusBar/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ import type { CustomProps } from '../../../components/types';
44
export interface InterfaceStatusBarProps extends StatusBarProps {}
55
export type IStatusBarProps = InterfaceStatusBarProps &
66
CustomProps<'StatusBar'>;
7+
8+
export type IStatusBarComponentType = (props: IStatusBarProps) => JSX.Element;

src/components/composites/Alert/types.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { MutableRefObject } from 'react';
2-
import type { IBoxProps, IIconProps } from '../../primitives';
2+
import type { InterfaceBoxProps } from '../../../components/primitives/Box';
3+
import type { IIconProps } from '../../primitives';
34
import type { CustomProps, VariantType } from '../../types';
45

5-
export interface InterfaceAlertProps extends IBoxProps<IAlertProps> {
6+
export interface InterfaceAlertProps extends InterfaceBoxProps<IAlertProps> {
67
/** The status of the alert
78
* @default info
89
*/

src/components/composites/AspectRatio/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { IBoxProps } from '../../primitives/Box';
1+
import type { InterfaceBoxProps } from '../../primitives/Box';
22
import type { CustomProps, ResponsiveValue } from '../../../components/types';
33

44
export interface InterfaceAspectRatioProps
5-
extends IBoxProps<IAspectRatioProps> {
5+
extends InterfaceBoxProps<IAspectRatioProps> {
66
/**
77
* The aspect ratio of the container. Some examples are `16/9`, `16/10`, `9/16`, `4/3`
88
* @default 4/3

src/components/composites/Avatar/types.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { IBoxProps } from '../../primitives/Box';
1+
import type { InterfaceBoxProps } from '../../primitives/Box';
22
import type { ImageSourcePropType } from 'react-native';
33
import type { MutableRefObject } from 'react';
44
import type { CustomProps, ResponsiveValue } from '../../../components/types';
55
import type { ISizes } from '../../../theme/base/sizes';
66

7-
export interface InterfaceAvatarProps extends IBoxProps<IAvatarProps> {
7+
export interface InterfaceAvatarProps extends InterfaceBoxProps<IAvatarProps> {
88
/**
99
* The image source of the avatar.
1010
*/
@@ -20,7 +20,8 @@ export interface InterfaceAvatarProps extends IBoxProps<IAvatarProps> {
2020
wrapperRef?: MutableRefObject<any>;
2121
}
2222

23-
export interface IAvatarBadgeProps extends IBoxProps<IAvatarBadgeProps> {}
23+
export interface IAvatarBadgeProps
24+
extends InterfaceBoxProps<IAvatarBadgeProps> {}
2425

2526
export interface IAvatarGroupProps extends IAvatarProps {
2627
/**

src/components/composites/Badge/types.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CustomProps, VariantType } from '../../types';
2-
import type { IBoxProps } from '../../primitives';
2+
import type { InterfaceBoxProps } from '../../primitives/Box';
33

4-
export interface InterfaceBadgeProps extends IBoxProps<IBadgeProps> {
4+
export interface InterfaceBadgeProps extends InterfaceBoxProps<IBadgeProps> {
55
/**
66
* The style variant of the badge.
77
* @default subtle
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CustomProps } from '../../../components/types/utils';
2-
import type { IBoxProps } from '../../primitives';
2+
import type { InterfaceBoxProps } from '../../primitives/Box';
33

4-
export interface InterfaceCardProps extends IBoxProps<ICardProps> {}
4+
export interface InterfaceCardProps extends InterfaceBoxProps<ICardProps> {}
55
export type ICardProps = InterfaceCardProps & CustomProps<'Card'>;

src/components/composites/PinInput/PinInputField.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const PinInputFiled = (
5050
}
5151
return (
5252
<Input
53+
//@ts-ignore
5354
ref={mergeRefs([myRef, ref])}
5455
{...context}
5556
{...props}

src/components/composites/Tag/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import Box from '../../primitives/Box';
33
import { useThemeProps } from '../../../hooks';
4-
import type { ITagProps } from './types';
4+
import type { IInputComponentType, ITagProps } from './types';
55
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
66

77
const Tag = ({ style, ...props }: ITagProps, ref: any) => {
@@ -13,5 +13,5 @@ const Tag = ({ style, ...props }: ITagProps, ref: any) => {
1313
return <Box style={style} {...resolvedProps} ref={ref} />;
1414
};
1515

16-
export default React.memo(React.forwardRef(Tag));
16+
export default React.memo(React.forwardRef(Tag)) as IInputComponentType;
1717
export type { ITagProps };

src/components/composites/Tag/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ export interface InterfaceTagProps extends InterfaceBoxProps<ITagProps> {
77
size?: string | number;
88
}
99

10+
export type IInputComponentType = (props: ITagProps) => JSX.Element;
11+
1012
export type ITagProps = InterfaceTagProps & CustomProps<'Tag'>;

0 commit comments

Comments
 (0)