Installation
npm install --save @types/react-primitives
Summary
This package contains type definitions for react-primitives (https://github.com/lelandrichardson/react-primitives).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-primitives.
index.d.ts
import { ComponentType } from "react";
import {
Animated,
Dimensions,
Easing,
Image,
PixelRatio,
PlatformOSType as RNPlatformOSType,
StyleSheet,
Text,
TouchableOpacityProps,
View,
} from "react-native";
export const Touchable: ComponentType<TouchableOpacityProps>;
// react-primitives also supports react-sketchapp and react-vr as platforms
export type PlatformOSType = RNPlatformOSType | "sketch" | "vr";
export interface PlatformStatic {
OS: PlatformOSType;
Version: number | string;
select<T>(specifics: { [platform in PlatformOSType | "default"]?: T }): T;
}
export const Platform: PlatformStatic;
export { Animated, Dimensions, Easing, Image, PixelRatio, StyleSheet, Text, View };
Additional Details
- Last updated: Thu, 21 Dec 2023 19:06:51 GMT
- Dependencies: @types/react, react-native
Credits
These definitions were written by Ahmed Ghoneim, and David Pett.