[log-symbols] introduce typings

This commit is contained in:
Dimitri Benin
2017-07-19 23:19:44 +02:00
parent a4a9db0264
commit 7b0267c18d
4 changed files with 44 additions and 0 deletions

9
types/log-symbols/index.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
// Type definitions for log-symbols 2.0
// Project: https://github.com/sindresorhus/log-symbols#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export const info: string;
export const success: string;
export const warning: string;
export const error: string;

View File

@@ -0,0 +1,12 @@
/// <reference types="node"/>
import * as logSymbols from 'log-symbols';
console.log(logSymbols.success, 'Finished successfully!');
let str: string;
str = logSymbols.info;
str = logSymbols.success;
str = logSymbols.warning;
str = logSymbols.error;

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",
"log-symbols-tests.ts"
]
}

View File

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