Skip to content

Commit

Permalink
Beef up logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeigler committed Aug 18, 2019
1 parent 77d9569 commit 1e044b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
12 changes: 6 additions & 6 deletions src/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ import { RIO, DefaultR, sync } from "./io";
* Suspend console.log in an IO
* @param msg
*/
export function log(msg: string): RIO<DefaultR, never, void> {
export function log(msg?: any, ...more: any[]): RIO<DefaultR, never, void> {
return sync(() => {
// tslint:disable-next-line
console.log(msg);
console.log(msg, ...more);
});
}

/**
* Suspend console.warn in an IO
* @param msg
*/
export function warn(msg: string): RIO<DefaultR, never, void> {
export function warn(msg?: any, ...more: any[]): RIO<DefaultR, never, void> {
return sync(() => {
// tslint:disable-next-line
console.warn(msg);
console.warn(msg, ...more);
});
}

/**
* Suspend console.error in an IO
* @param msg
*/
export function error(msg: string): RIO<DefaultR, never, void> {
export function error(msg?: any, ...more: any[]): RIO<DefaultR, never, void> {
return sync(() => {
// tslint:disable-next-line
console.error(msg);
console.error(msg, ...more);
});
}
14 changes: 0 additions & 14 deletions src/streams.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"lib": ["dom", "es2015"],
"lib": ["dom", "es2015", "es2016"],
"declaration": true,
"outDir": "./lib",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"lib": ["dom", "es2015"],
"lib": ["dom", "es2015", "es2016"],
"declaration": true,
"outDir": "./build",
"strict": true,
Expand Down

0 comments on commit 1e044b7

Please sign in to comment.