Skip to content

Commit

Permalink
[node] add util.formatWithOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Flarna committed Aug 24, 2018
1 parent 37926fa commit 5a41ffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/node/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6331,6 +6331,7 @@ declare module "stream" {
declare module "util" {
export interface InspectOptions extends NodeJS.InspectOptions { }
export function format(format: any, ...param: any[]): string;
export function formatWithOptions(inspectOptions: InspectOptions, format: any, ...param: any[]): string;
/** @deprecated since v0.11.3 - use `console.error()` instead. */
export function debug(string: string): void;
/** @deprecated since v0.11.3 - use `console.error()` instead. */
Expand Down
2 changes: 2 additions & 0 deletions types/node/node-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ namespace util_tests {
});
assert(typeof util.inspect.custom === 'symbol');

util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });

// util.callbackify
// tslint:disable-next-line no-unnecessary-class
class callbackifyTest {
Expand Down

0 comments on commit 5a41ffa

Please sign in to comment.