diff --git a/types/gray-percentage/gray-percentage-tests.ts b/types/gray-percentage/gray-percentage-tests.ts new file mode 100644 index 0000000000..e181670a0f --- /dev/null +++ b/types/gray-percentage/gray-percentage-tests.ts @@ -0,0 +1,12 @@ +import grayPercentage = require('gray-percentage'); + +grayPercentage(1); +grayPercentage(1, 1); +grayPercentage(1, 'cool'); +grayPercentage(1, 'slate'); +grayPercentage(1, 'warm'); +grayPercentage(1, 1, true); + +function testReturnValue(value: string): void {} + +testReturnValue(grayPercentage(1)); diff --git a/types/gray-percentage/index.d.ts b/types/gray-percentage/index.d.ts new file mode 100644 index 0000000000..e04ed7e5a9 --- /dev/null +++ b/types/gray-percentage/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for gray-percentage 2.0 +// Project: https://github.com/KyleAMathews/gray-percentage +// Definitions by: Luis Rodrigues +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = grayPercentage; + +declare function grayPercentage( + lightness: number, + hue?: number | 'cool' | 'slate' | 'warm', + darkBackground?: boolean, +): string; diff --git a/types/gray-percentage/tsconfig.json b/types/gray-percentage/tsconfig.json new file mode 100644 index 0000000000..4b03261021 --- /dev/null +++ b/types/gray-percentage/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", + "gray-percentage-tests.ts" + ] +} diff --git a/types/gray-percentage/tslint.json b/types/gray-percentage/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gray-percentage/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }