Add types for min-indent (#31250)

This commit is contained in:
Dimitri Benin
2018-12-17 15:07:29 -08:00
committed by Nathan Shively-Sanders
parent 1935ac55bc
commit 081a2f0a52
4 changed files with 37 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for min-indent 1.0
// Project: https://github.com/thejameskyle/min-indent#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = minIndent;
declare function minIndent(str: string): number;
+5
View File
@@ -0,0 +1,5 @@
import minIndent = require('min-indent');
const str = '\tunicorn\n\t\tcake';
// $ExpectType number
minIndent(str);
+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",
"min-indent-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }