diff --git a/types/plur/index.d.ts b/types/plur/index.d.ts new file mode 100644 index 0000000000..3f94e66fef --- /dev/null +++ b/types/plur/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for plur 3.0 +// Project: https://github.com/sindresorhus/plur#readme +// Definitions by: Kyle Roach +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function plur( + word: string, + plural: string | number, + count?: number +): string; + +export = plur; diff --git a/types/plur/plur-tests.ts b/types/plur/plur-tests.ts new file mode 100644 index 0000000000..be509830df --- /dev/null +++ b/types/plur/plur-tests.ts @@ -0,0 +1,5 @@ +import plur = require('plur'); + +const word = 'chicken'; + +plur(word, 2); diff --git a/types/plur/tsconfig.json b/types/plur/tsconfig.json new file mode 100644 index 0000000000..cb98c338e3 --- /dev/null +++ b/types/plur/tsconfig.json @@ -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"] +} diff --git a/types/plur/tslint.json b/types/plur/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/plur/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }