From d96c3407ae78faa09880bfb873134dfc2ae23700 Mon Sep 17 00:00:00 2001 From: Christian Chown Date: Thu, 11 Oct 2018 18:36:12 +0100 Subject: [PATCH] Add typings for react-native-restart (#29644) --- types/react-native-restart/index.d.ts | 11 +++++++++ .../react-native-restart-tests.tsx | 4 ++++ types/react-native-restart/tsconfig.json | 24 +++++++++++++++++++ types/react-native-restart/tslint.json | 1 + 4 files changed, 40 insertions(+) create mode 100644 types/react-native-restart/index.d.ts create mode 100644 types/react-native-restart/react-native-restart-tests.tsx create mode 100644 types/react-native-restart/tsconfig.json create mode 100644 types/react-native-restart/tslint.json diff --git a/types/react-native-restart/index.d.ts b/types/react-native-restart/index.d.ts new file mode 100644 index 0000000000..b73c06a291 --- /dev/null +++ b/types/react-native-restart/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for react-native-restart 0.0 +// Project: https://github.com/avishayil/react-native-restart#readme +// Definitions by: Christian Chown +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +declare let ReactNativeRestart: { + Restart(): void; +}; + +export default ReactNativeRestart; diff --git a/types/react-native-restart/react-native-restart-tests.tsx b/types/react-native-restart/react-native-restart-tests.tsx new file mode 100644 index 0000000000..dee25ace3d --- /dev/null +++ b/types/react-native-restart/react-native-restart-tests.tsx @@ -0,0 +1,4 @@ +import * as React from "react"; +import ReactNativeRestart from "react-native-restart"; + +ReactNativeRestart.Restart(); diff --git a/types/react-native-restart/tsconfig.json b/types/react-native-restart/tsconfig.json new file mode 100644 index 0000000000..85f654f9c1 --- /dev/null +++ b/types/react-native-restart/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react-native", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-native-restart-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-restart/tslint.json b/types/react-native-restart/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/react-native-restart/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file