Add types for humanize-string (#23266)

* Add types for humanize-string

* remove namespace
This commit is contained in:
Kevin Nacios
2018-01-30 14:22:36 -05:00
committed by Sheetal Nandi
parent b3bc318cf2
commit 5beff6a920
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import humanizeString = require('humanize-string');
humanizeString('UnicornsAndRainbows');
humanizeString('unicorns_and-Rainbows_andPonies ');

8
types/humanize-string/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for humanize-string 1.0
// Project: https://github.com/sindresorhus/humanize-string/
// Definitions by: Kevin Nacios <https://github.com/ragnarok56>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function humanizeString(text: string): string;
export = humanizeString;

View File

@@ -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",
"humanize-string-tests.ts"
]
}

View File

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