add fancy-log types

This commit is contained in:
Pine Mizune 2017-11-04 23:09:33 +09:00
parent f7f81bced2
commit 98363f3261
4 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,26 @@
import log = require('./');
log();
log(1);
log('foo');
log('foo', 'bar');
log.dir();
log.dir(1);
log.dir('foo');
log.dir('foo', 'bar');
log.error();
log.error(1);
log.error('foo');
log.error('foo', 'bar');
log.info();
log.info(1);
log.info('foo');
log.info('foo', 'bar');
log.warn();
log.warn(1);
log.warn('foo');
log.warn('foo', 'bar');

17
types/fancy-log/index.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
// Type definitions for fancy-log 1.3
// Project: https://github.com/js-cli/fancy-log
// Definitions by: Pine Mizune <https://github.com/pine>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace FancyLog {
interface Logger {
(...args: any[]): Logger;
dir(...args: any[]): Logger;
error(...args: any[]): Logger;
info(...args: any[]): Logger;
warn(...args: any[]): Logger;
}
}
declare var logger: FancyLog.Logger;
export = logger;

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

View File

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