feat(to-slug-case): new type definition (#43404)

Types for utility function:
- definition file
- test

https://www.npmjs.com/package/to-slug-case

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz) 2020-03-27 06:34:17 +01:00 committed by GitHub
parent c45ee40049
commit 54efff975c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

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

@ -0,0 +1,8 @@
// Type definitions for to-slug-case 1.0
// Project: https://github.com/ianstormtaylor/to-slug-case
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function toSlugCase(str: string): string;
export = toSlugCase;

View File

@ -0,0 +1,3 @@
import toSlugCase = require('to-slug-case');
toSlugCase('camelCase'); // $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-slug-case-tests.ts"
]
}

View File

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