[hex-rgba] add typings

This commit is contained in:
Andrew Makarov
2017-11-16 23:59:01 +03:00
parent dc25aedc42
commit 6c8ded95d7
4 changed files with 35 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
import hexToRgba = require('hex-rgba');
const rgba = hexToRgba('#1b2b34', 40);
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for hex-rgba 1.0
// Project: https://github.com/developersoul/hex-rgba#readme
// Definitions by: Andrew Makarov <https://github.com/r3nya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = hexToRgba;
declare function hexToRgba(hex: string, opacity: number): string;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"strictFunctionTypes": true
},
"files": [
"index.d.ts",
"hex-rgba-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }