diff --git a/types/uuidv4/index.d.ts b/types/uuidv4/index.d.ts index e181a39244..44f8fc4efe 100644 --- a/types/uuidv4/index.d.ts +++ b/types/uuidv4/index.d.ts @@ -3,32 +3,16 @@ // Definitions by: Rindo Hinase // 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; +}