mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #21111 from Pr1st0n/lil-uuid
Added definitions for lil-uuid
This commit is contained in:
Vendored
+19
@@ -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;
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as lil from 'lil-uuid';
|
||||
|
||||
lil.uuid();
|
||||
lil.isUUID('f47ac10b-58cc-4372-a567-0e02b2c3d479');
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user