diff --git a/types/rgb2hex/index.d.ts b/types/rgb2hex/index.d.ts new file mode 100644 index 0000000000..9bf1824452 --- /dev/null +++ b/types/rgb2hex/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for rgb2hex 0.2 +// Project: https://github.com/christian-bromann/rgb2hex +// Definitions by: abh80 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare function hex2rgb(rgb: string): { + hex: string; + alpha: number; +}; +export = hex2rgb; diff --git a/types/rgb2hex/rgb2hex-tests.ts b/types/rgb2hex/rgb2hex-tests.ts new file mode 100644 index 0000000000..7edfbfc636 --- /dev/null +++ b/types/rgb2hex/rgb2hex-tests.ts @@ -0,0 +1,3 @@ +import rgb2hex = require('rgb2hex'); +rgb2hex('rgb(210,43,2525)'); +rgb2hex('rgba(12,173,22,.67)'); diff --git a/types/rgb2hex/tsconfig.json b/types/rgb2hex/tsconfig.json new file mode 100644 index 0000000000..b2de53c728 --- /dev/null +++ b/types/rgb2hex/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rgb2hex-tests.ts" + ] +} \ No newline at end of file diff --git a/types/rgb2hex/tslint.json b/types/rgb2hex/tslint.json new file mode 100644 index 0000000000..2c4255660e --- /dev/null +++ b/types/rgb2hex/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file