mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-03-03 21:22:51 +00:00
adds typings for the 'triple-beam' package.
This commit is contained in:
parent
c9489b79d3
commit
e6c19da9e7
22
types/triple-beam/index.d.ts
vendored
Normal file
22
types/triple-beam/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Type definitions for triple-beam 1.3
|
||||
// Project: https://github.com/winstonjs/triple-beam
|
||||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace TripleBeam;
|
||||
|
||||
export const LEVEL: string;
|
||||
export const MESSAGE: string;
|
||||
export const SPLAT: string;
|
||||
export const configs: Configs;
|
||||
|
||||
export interface Config {
|
||||
readonly levels: {[k: string]: number};
|
||||
readonly colors: {[k: string]: string};
|
||||
}
|
||||
|
||||
export interface Configs {
|
||||
readonly cli: Config;
|
||||
readonly npm: Config;
|
||||
readonly syslog: Config;
|
||||
}
|
||||
13
types/triple-beam/triple-beam-tests.ts
Normal file
13
types/triple-beam/triple-beam-tests.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import tripleBeam = require('triple-beam');
|
||||
|
||||
const level: string = tripleBeam.LEVEL;
|
||||
const message: string = tripleBeam.MESSAGE;
|
||||
const splat: string = tripleBeam.SPLAT;
|
||||
const configsObj: tripleBeam.Configs = tripleBeam.configs;
|
||||
|
||||
const cli: tripleBeam.Config = configsObj.cli;
|
||||
const npm: tripleBeam.Config = configsObj.npm;
|
||||
const syslog: tripleBeam.Config = configsObj.syslog;
|
||||
|
||||
const levels = cli.levels;
|
||||
const colors = cli.colors;
|
||||
23
types/triple-beam/tsconfig.json
Normal file
23
types/triple-beam/tsconfig.json
Normal 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",
|
||||
"triple-beam-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/triple-beam/tslint.json
Normal file
3
types/triple-beam/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user