Merge pull request #30267 from burtek/react-native-uuid-generator

New types for react-native-uuid-generator
This commit is contained in:
Daniel Rosenwasser
2018-11-04 22:34:20 -08:00
committed by GitHub
4 changed files with 40 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for react-native-uuid-generator 4.0
// Project: https://github.com/Traviskn/react-native-uuid-generator#readme
// Definitions by: burtek <https://github.com/burtek>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace UUIDGenerator {
function getRandomUUID(): Promise<string>;
function getRandomUUID(callback: (uuid: string) => void): void;
}
export default UUIDGenerator;
@@ -0,0 +1,5 @@
import UUIDGenerator from 'react-native-uuid-generator';
UUIDGenerator.getRandomUUID().then((uuid: string) => { }).catch((error: any) => { });
UUIDGenerator.getRandomUUID((uuid: string) => { });
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"react-native-uuid-generator-tests.ts"
]
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }