Merge pull request #21111 from Pr1st0n/lil-uuid

Added definitions for lil-uuid
This commit is contained in:
Daniel Rosenwasser
2017-11-07 00:24:52 -08:00
committed by GitHub
4 changed files with 47 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// Type definitions for lil-uuid 0.1
// Project: https://github.com/lil-js/uuid
// Definitions by: Pr1st0n <https://github.com/Pr1st0n>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Generate a random UUID
*
* @returns UUID string.
*/
export function uuid(): string;
/**
* Check if a given string has a valid UUID format. It supports multiple version (3, 4 and 5).
*
* @param uuid UUID string.
* @returns True if string is valid UUID, false otherwise.
*/
export function isUUID(uuid: string): boolean;
+4
View File
@@ -0,0 +1,4 @@
import * as lil from 'lil-uuid';
lil.uuid();
lil.isUUID('f47ac10b-58cc-4372-a567-0e02b2c3d479');
+23
View File
@@ -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",
"lil-uuid-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }