From b4ef220eace86a8aabb2837a7351fc8ea5ef8611 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 14 Apr 2018 21:13:47 +0200 Subject: [PATCH] Add react-native-keyboard-spacer types (#24993) --- types/react-native-keyboard-spacer/index.d.ts | 16 +++++++++++++ .../react-native-keyboard-spacer-tests.tsx | 6 +++++ .../tsconfig.json | 24 +++++++++++++++++++ .../react-native-keyboard-spacer/tslint.json | 1 + 4 files changed, 47 insertions(+) create mode 100644 types/react-native-keyboard-spacer/index.d.ts create mode 100644 types/react-native-keyboard-spacer/react-native-keyboard-spacer-tests.tsx create mode 100644 types/react-native-keyboard-spacer/tsconfig.json create mode 100644 types/react-native-keyboard-spacer/tslint.json diff --git a/types/react-native-keyboard-spacer/index.d.ts b/types/react-native-keyboard-spacer/index.d.ts new file mode 100644 index 0000000000..0c7ec24262 --- /dev/null +++ b/types/react-native-keyboard-spacer/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for react-native-keyboard-spacer 0.4 +// Project: https://github.com/Andr3wHur5t/react-native-keyboard-spacer#readme +// Definitions by: Vincent Langlet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import * as React from 'react'; +import * as ReactNative from 'react-native'; + +export interface KeyboardSpacerProps { + topSpacing?: number; + onToggle?: (keyboardIsOpen: boolean, keyboardSpace: number) => void; + style?: ReactNative.StyleProp; +} + +export default class KeyboardSpacer extends React.Component { } diff --git a/types/react-native-keyboard-spacer/react-native-keyboard-spacer-tests.tsx b/types/react-native-keyboard-spacer/react-native-keyboard-spacer-tests.tsx new file mode 100644 index 0000000000..7deb9798ef --- /dev/null +++ b/types/react-native-keyboard-spacer/react-native-keyboard-spacer-tests.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import KeyboardSpacer from 'react-native-keyboard-spacer'; + +() => { + ; +}; diff --git a/types/react-native-keyboard-spacer/tsconfig.json b/types/react-native-keyboard-spacer/tsconfig.json new file mode 100644 index 0000000000..04110630ce --- /dev/null +++ b/types/react-native-keyboard-spacer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-native-keyboard-spacer-tests.tsx" + ] +} diff --git a/types/react-native-keyboard-spacer/tslint.json b/types/react-native-keyboard-spacer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-keyboard-spacer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }