mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-11 17:30:51 +08:00
Add typescript definitions
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"main": "src/screens.js",
|
||||
"types": "src/screens.d.ts",
|
||||
"files": [
|
||||
"src/",
|
||||
"android/src/main/AndroidManifest.xml",
|
||||
|
||||
19
src/screens.d.ts
vendored
Normal file
19
src/screens.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Project: https://github.com/kmagiera/react-native-screens
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
declare module 'react-native-screens' {
|
||||
import { ComponentClass } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
|
||||
export function useScreens(shouldUseScreens?: boolean): void;
|
||||
export function screensEnabled(): boolean;
|
||||
|
||||
export interface ScreenProps extends ViewProps {
|
||||
active?: boolean;
|
||||
onComponentRef?: (view: any) => void;
|
||||
}
|
||||
export const Screen: ComponentClass<ScreenProps>;
|
||||
|
||||
export type ScreenContainerProps = ViewProps;
|
||||
export const ScreenContainer: ComponentClass<ScreenContainerProps>;
|
||||
}
|
||||
Reference in New Issue
Block a user