mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Restructured to more appropriate type definition
This commit is contained in:
Vendored
+12
-28
@@ -3,32 +3,16 @@
|
||||
// Definitions by: Rindo Hinase <https://github.com/Hinaser>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare const uuidv4: UUIDv4;
|
||||
|
||||
interface UUIDv4_is {
|
||||
(value: string): boolean;
|
||||
}
|
||||
|
||||
type EmptyUUIDv4 = '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
interface UUIDv4_empty {
|
||||
(): string;
|
||||
}
|
||||
|
||||
interface UUIDv4_FromString {
|
||||
(text: string): string;
|
||||
}
|
||||
|
||||
interface UUIDv4 {
|
||||
(): string;
|
||||
is: UUIDv4_is;
|
||||
empty: UUIDv4_empty;
|
||||
fromString: UUIDv4_FromString;
|
||||
}
|
||||
|
||||
// If you read this because linter warns you like '... has no default export'
|
||||
// please try to write import statement like
|
||||
// import * as uuidv4 from 'uuidv4'
|
||||
// rather than
|
||||
// import uuidv4 from 'uuidv4'
|
||||
export = uuidv4;
|
||||
|
||||
declare function uuidv4(): string;
|
||||
|
||||
declare namespace uuidv4 {
|
||||
type EmptyUUIDv4 = '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
function is(value: string): boolean;
|
||||
|
||||
function empty(): string;
|
||||
|
||||
function fromString(text: string): string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user