Skip to content

Commit

Permalink
feat(tasks): print can take no arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Feb 19, 2021
1 parent 9113397 commit df08e29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tasks/stdio/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Task, Context } from '../../definitions';
import { addPrefix } from '../../helpers/prefix';
import util from 'util';

export function print(item: any, ...data: any[]): Task.Sync {
export function print(...data: any[]): Task.Sync {
return (ctx: Context): void => {
const str = addPrefix(
util.format(item, ...data) + '\n',
data.length ? util.format(data[0], ...data.slice(1)) + '\n' : '\n',
null,
'print',
ctx
Expand Down

0 comments on commit df08e29

Please sign in to comment.