From bced52505f32d6cca4f944bb610a8a26767908a8 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Sun, 29 Mar 2020 04:03:49 +1100 Subject: Update to Prettier 2 and use ES Private Fields (#4498) --- std/testing/format.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'std/testing/format.ts') diff --git a/std/testing/format.ts b/std/testing/format.ts index 62fdde5eb..ee291dc23 100644 --- a/std/testing/format.ts +++ b/std/testing/format.ts @@ -56,7 +56,7 @@ const DEFAULT_OPTIONS: Options = { indent: 2, maxDepth: Infinity, min: false, - printFunctionName: true + printFunctionName: true, }; interface BasicValueOptions { @@ -358,8 +358,8 @@ function printIteratorValues( return result; } -const getKeysOfEnumerableProperties = (object: {}): Array => { - const keys: Array = Object.keys(object).sort(); +function getKeysOfEnumerableProperties(object: T): Array { + const keys = Object.keys(object).sort() as Array; if (Object.getOwnPropertySymbols) { Object.getOwnPropertySymbols(object).forEach((symbol): void => { @@ -372,7 +372,7 @@ const getKeysOfEnumerableProperties = (object: {}): Array => { } return keys; -}; +} /** * Return properties of an object @@ -519,7 +519,7 @@ const getConfig = (options: Options): Config => ({ ...options, indent: options.min ? "" : createIndent(options.indent), spacingInner: options.min ? " " : "\n", - spacingOuter: options.min ? "" : "\n" + spacingOuter: options.min ? "" : "\n", }); /** @@ -531,7 +531,7 @@ const getConfig = (options: Options): Config => ({ export function format(val: any, options: Optional = {}): string { const opts: Options = { ...DEFAULT_OPTIONS, - ...options + ...options, }; const basicResult = printBasicValue(val, opts); if (basicResult !== null) { -- cgit v1.2.3