🤖 Merge PR #46617 Added types for rgb2hex by @abh80

* Add files via upload

* fixed white spaces
This commit is contained in:
Sfue 2020-08-12 11:38:32 +05:30 committed by GitHub
parent 5ac9294b5d
commit 2a4dec52e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 0 deletions

9
types/rgb2hex/index.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
// Type definitions for rgb2hex 0.2
// Project: https://github.com/christian-bromann/rgb2hex
// Definitions by: abh80 <https://github.com/abh80>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function hex2rgb(rgb: string): {
hex: string;
alpha: number;
};
export = hex2rgb;

View File

@ -0,0 +1,3 @@
import rgb2hex = require('rgb2hex');
rgb2hex('rgb(210,43,2525)');
rgb2hex('rgba(12,173,22,.67)');

View File

@ -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"
]
}

View File

@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}