[redent] Add types

This commit is contained in:
Dimitri Benin
2018-12-16 20:57:43 +01:00
parent 39b514a4bb
commit 08cc39e081
4 changed files with 39 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for redent 2.0
// Project: https://github.com/sindresorhus/redent#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = redent;
declare function redent(input: string, count?: number, indent?: string): string;
+8
View File
@@ -0,0 +1,8 @@
import redent = require('redent');
// $ExpectType string
redent('\n foo\n bar\n');
// $ExpectType string
redent('\n foo\n bar\n', 1);
// $ExpectType string
redent('\n foo\n bar\n', 1, ' ');
+23
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",
"redent-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }