mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #30267 from burtek/react-native-uuid-generator
New types for react-native-uuid-generator
This commit is contained in:
+11
@@ -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" }
|
||||
Reference in New Issue
Block a user