diff --git a/types/cuid/cuid-tests.ts b/types/cuid/cuid-tests.ts index 82defb5fae..7ce182bae6 100644 --- a/types/cuid/cuid-tests.ts +++ b/types/cuid/cuid-tests.ts @@ -1,4 +1,5 @@ -import cuid = require('cuid') +import cuid = require('cuid'); -var result: string = cuid(); \ No newline at end of file +var cuidResult: string = cuid(); +var slugResult: string = cuid.slug(); diff --git a/types/cuid/index.d.ts b/types/cuid/index.d.ts index d7979eefcd..a7ee33e7b0 100644 --- a/types/cuid/index.d.ts +++ b/types/cuid/index.d.ts @@ -1,9 +1,12 @@ -// Type definitions for cuid +// Type definitions for cuid v1.3.8 // Project: https://github.com/ericelliott/cuid -// Definitions by: Dave Keen +// Definitions by: Dave Keen , João Forja // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +interface CUID { + (): string; + slug: () => string; +} +declare var cuid: CUID; -declare function cuid(): string; - -export = cuid +export = cuid; \ No newline at end of file