mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
[log-symbols] introduce typings
This commit is contained in:
9
types/log-symbols/index.d.ts
vendored
Normal file
9
types/log-symbols/index.d.ts
vendored
Normal 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;
|
||||
12
types/log-symbols/log-symbols-tests.ts
Normal file
12
types/log-symbols/log-symbols-tests.ts
Normal 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;
|
||||
22
types/log-symbols/tsconfig.json
Normal file
22
types/log-symbols/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/log-symbols/tslint.json
Normal file
1
types/log-symbols/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user