UNPKG

swiftui-react-native

Version:

A React Native component library inspired by SwiftUI

10 lines (9 loc) 285 B
import { SetStateAction } from 'react'; export type Binding<T> = { value: T; setValue: React.Dispatch<SetStateAction<T>>; }; export type BooleanBinding = Binding<boolean> & { toggle: () => void; }; export declare function getValueOrBinding<T>(incoming: T | Binding<T>): T;