feat: Add typings for to-title-case (#41547)

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
Richie Bendall 2020-01-16 11:13:40 +13:00 committed by Eli Barzilay
parent 6001fc7115
commit a0201c397a
4 changed files with 35 additions and 0 deletions

8
types/to-title-case/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for to-title-case 1.0
// Project: https://github.com/ianstormtaylor/to-title-case
// Definitions by: Richie Bendall <https://github.com/Richienb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function toTitleCase(string: string): string;
export = toTitleCase;

View File

@ -0,0 +1,3 @@
import toTitleCase = require("to-title-case");
toTitleCase("a"); // $ExpectType string

View File

@ -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",
"to-title-case-tests.ts"
]
}

View File

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