diff --git a/types/guid/guid-tests.ts b/types/guid/guid-tests.ts new file mode 100644 index 0000000000..cb5008d2a2 --- /dev/null +++ b/types/guid/guid-tests.ts @@ -0,0 +1,5 @@ +import guid = require('guid'); + +const newRawGuid: string = guid.raw(); +const isAGuid: boolean = guid.isGuid(newRawGuid); +const newGuidObject: object = guid.create(); diff --git a/types/guid/index.d.ts b/types/guid/index.d.ts new file mode 100644 index 0000000000..210a1f9584 --- /dev/null +++ b/types/guid/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for guid 1.0 +// Project: https://github.com/dandean/guid +// Definitions by: Marc-Andre Roy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Declaration file generated by dts-gen */ + +export = guid; + +declare function guid(guid: string | guid): any; + +declare namespace guid { + const EMPTY: string; + + const prototype: { + }; + + function create(): object; + + function isGuid(value: string): boolean; + + function raw(): string; + + namespace create { + const prototype: { + }; + } + + namespace isGuid { + const prototype: { + }; + } + + namespace raw { + const prototype: { + }; + } +} diff --git a/types/guid/tsconfig.json b/types/guid/tsconfig.json new file mode 100644 index 0000000000..5d335b8f70 --- /dev/null +++ b/types/guid/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "guid-tests.ts" + ] +} diff --git a/types/guid/tslint.json b/types/guid/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/guid/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }