Changed cuid to a variable and added slug method to it. (#15793)

* Changed cuid to a variable and added slug method to it.

* Reverted change
This commit is contained in:
João Forja
2017-04-20 11:16:42 -07:00
committed by Andy
parent 54f335248d
commit 677e0ac511
2 changed files with 11 additions and 7 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import cuid = require('cuid')
import cuid = require('cuid');
var result: string = cuid();
var cuidResult: string = cuid();
var slugResult: string = cuid.slug();
+8 -5
View File
@@ -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 <http://www.keendevelopment.ch>
// Definitions by: Dave Keen <http://www.keendevelopment.ch>, João Forja <http://discipliningcode.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface CUID {
(): string;
slug: () => string;
}
declare var cuid: CUID;
declare function cuid(): string;
export = cuid
export = cuid;