mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[gray-percentage] new typings (#38661)
This commit is contained in:
committed by
Ben Lichtman
parent
a960c0bd92
commit
7b9dc4408e
@@ -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));
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for gray-percentage 2.0
|
||||
// Project: https://github.com/KyleAMathews/gray-percentage
|
||||
// Definitions by: Luis Rodrigues <https://github.com/goblindegook>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = grayPercentage;
|
||||
|
||||
declare function grayPercentage(
|
||||
lightness: number,
|
||||
hue?: number | 'cool' | 'slate' | 'warm',
|
||||
darkBackground?: boolean,
|
||||
): string;
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user