mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31459 from BendingBender/skin-tone
[skin-tone] Add types
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for skin-tone 1.0
|
||||
// Project: https://github.com/sindresorhus/skin-tone#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = skinTone;
|
||||
|
||||
declare function skinTone(emoji: string, type: 0 | 1 | 2 | 3 | 4 | 5): string;
|
||||
|
||||
declare namespace skinTone {
|
||||
const NONE: 0;
|
||||
const WHITE: 1;
|
||||
const CREAM_WHITE: 2;
|
||||
const LIGHT_BROWN: 3;
|
||||
const BROWN: 4;
|
||||
const DARK_BROWN: 5;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import skinTone = require('skin-tone');
|
||||
|
||||
// $ExpectType string
|
||||
skinTone('👍', 4);
|
||||
skinTone('👍', skinTone.NONE);
|
||||
skinTone('👍', skinTone.WHITE);
|
||||
skinTone('👍', skinTone.CREAM_WHITE);
|
||||
skinTone('👍', skinTone.LIGHT_BROWN);
|
||||
skinTone('👍', skinTone.BROWN);
|
||||
skinTone('👍', skinTone.DARK_BROWN);
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"skin-tone-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user