Add typings for guid npm package.

This commit is contained in:
Marc-Andre Roy
2017-10-26 16:44:04 -04:00
parent 5761cfc6f2
commit 11ac6579bc
4 changed files with 66 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import guid = require('guid');
const newRawGuid: string = guid.raw();
const isAGuid: boolean = guid.isGuid(newRawGuid);
const newGuidObject: object = guid.create();
+38
View File
@@ -0,0 +1,38 @@
// Type definitions for guid 1.0
// Project: https://github.com/dandean/guid
// Definitions by: Marc-Andre Roy <https://github.com/maroy1986>
// 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: {
};
}
}
+22
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }