Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
errors:

Types of property 'onPressIn' are incompatible.
  Type '((event: GestureResponderEvent) => void) | null | undefined' is not assignable to type '((event: GestureResponderEvent) => void) | undefined'.
      Type 'null' is not assignable to type '((event: GestureResponderEvent) => void) | undefined'.

…and other similar ones.
  • Loading branch information
zetavg committed Dec 19, 2024
1 parent 24cb860 commit b1fbeb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/one/src/interfaces/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
PartialState,
} from '@react-navigation/core'
import type { ReactNode } from 'react'
import type { TextProps, GestureResponderEvent } from 'react-native'
import type { TextProps, GestureResponderEvent, PressableProps } from 'react-native'

export namespace OneRouter {
export interface __routes<T extends string = string> extends Record<string, unknown> {}
Expand Down Expand Up @@ -305,7 +305,8 @@ export namespace OneRouter {
}

export interface LinkProps<T extends string | object>
extends Omit<TextProps, 'href'>,
extends Omit<TextProps, 'href' | 'disabled' | 'onLongPress' | 'onPressIn' | 'onPressOut'>,
Pick<PressableProps, 'disabled' | 'onLongPress' | 'onPressIn' | 'onPressOut'>,
WebAnchorProps {
/** Path to route to. */
href: Href<T>
Expand Down

0 comments on commit b1fbeb8

Please sign in to comment.