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