Skip to content

Commit

Permalink
Merge branch 'master' into fix-dataset-web
Browse files Browse the repository at this point in the history
  • Loading branch information
lareinayanyu committed Jan 6, 2025
2 parents 0485be9 + ec89f05 commit d3e5f1f
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { ViewStyle } from 'react-native'
import { FunctionComponent } from 'react'

type NumberVal = number | `${number}%`
type backgroundPositionList = ['left' | 'right', NumberVal, 'top' | 'bottom', NumberVal] | []

export type ExtendedViewStyle = ViewStyle & {
backgroundImage?: string
backgroundSize?: Array<NumberVal | 'auto' | 'contain' | 'cover'>
borderRadius?: string | number
backgroundPosition?: backgroundPositionList
[key: string]: any
transform?: {[key: string]: number | string}[]
}

export type ExtendedFunctionComponent = FunctionComponent & {
isCustomText?: boolean
}

export type AnyFunc = (...args: ReadonlyArray<any>) => any
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { MutableRefObject } from 'react'
import { NativeSyntheticEvent } from 'react-native'

type LayoutRef = MutableRefObject<any>

type SetTimeoutReturnType = ReturnType<typeof setTimeout>

type Props = Record<string, any>

type AdditionalProps = Record<string, any>;

type RemoveProps = string[];

type NativeTouchEvent = NativeSyntheticEvent<NativeEvent>

type Navigation = Record<string, any>

interface NativeEvent {
timestamp: number;
pageX: number;
pageY: number;
touches: TouchPoint[]
changedTouches: TouchPoint[]
}

interface TouchPoint {
identifier: number;
pageX: number;
pageY: number;
clientX: number;
clientY: number;
locationX?: number;
locationY?: number;
}

interface InnerRef {
startTimer: {
bubble: null | ReturnType<typeof setTimeout>;
capture: null | ReturnType<typeof setTimeout>;
};
mpxPressInfo: {
detail: {
x: number;
y: number;
};
};
}
interface UseInnerPropsConfig {
layoutRef: LayoutRef;
disableTouch?: boolean;
disableTap?: boolean
}
interface DataSetType {
[key: string]: string;
}

export {
NativeTouchEvent,
Props,
AdditionalProps,
RemoveProps,
UseInnerPropsConfig,
InnerRef,
LayoutRef,
SetTimeoutReturnType,
DataSetType,
Navigation
}

0 comments on commit d3e5f1f

Please sign in to comment.