Merge pull request #28408 from iRoachie/plur

Add definitions for plur
This commit is contained in:
Mine Starks
2018-09-13 18:30:23 -07:00
committed by GitHub
4 changed files with 34 additions and 0 deletions

12
types/plur/index.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
// Type definitions for plur 3.0
// Project: https://github.com/sindresorhus/plur#readme
// Definitions by: Kyle Roach <https://github.com/iRoachie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function plur(
word: string,
plural: string | number,
count?: number
): string;
export = plur;

5
types/plur/plur-tests.ts Normal file
View File

@@ -0,0 +1,5 @@
import plur = require('plur');
const word = 'chicken';
plur(word, 2);

16
types/plur/tsconfig.json Normal file
View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"strictFunctionTypes": true
},
"files": ["index.d.ts", "plur-tests.ts"]
}

1
types/plur/tslint.json Normal file
View File

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