[has-ansi] add typings (#18923)

This commit is contained in:
Dimitri Benin
2017-08-14 10:06:38 -07:00
committed by Mohamed Hegazy
parent 31bbe3ce77
commit 67e320cf41
4 changed files with 36 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import hasAnsi = require('has-ansi');
// $ExpectType boolean
hasAnsi('\u001B[4mUnicorn\u001B[0m');
hasAnsi('cake');
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for has-ansi 3.0
// Project: https://github.com/chalk/has-ansi#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = hasAnsi;
declare function hasAnsi(input: string): boolean;
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"has-ansi-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }