From f5fbd9020cb378622f0f40f47786aa349871e772 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Tue, 4 Jun 2024 13:11:07 +0200 Subject: [PATCH 1/2] Add comment --- .../console/public/lib/autocomplete/autocomplete.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/console/public/lib/autocomplete/autocomplete.ts b/src/plugins/console/public/lib/autocomplete/autocomplete.ts index d6d2a8e711f13..01fb8e35e6834 100644 --- a/src/plugins/console/public/lib/autocomplete/autocomplete.ts +++ b/src/plugins/console/public/lib/autocomplete/autocomplete.ts @@ -43,8 +43,14 @@ function isUrlParamsToken(token: { type: string } | null) { } } +/* Logs the provided arguments to the console if the `window.autocomplete_trace` flag is set to true. + * This function checks if the `autocomplete_trace` flag is enabled on the `window` object. This is + * only used when executing functional tests. + * If the flag is enabled, it logs each argument to the console. + * If an argument is an object, it is stringified before logging. + */ const tracer = (...args: any[]) => { - // @ts-expect-error ts upgrade v4.7.4 + // @ts-ignore if (window.autocomplete_trace) { // eslint-disable-next-line no-console console.log.call( From cfcc0276b952c196e8490c6f5f0602e13ba6ed7d Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Tue, 4 Jun 2024 13:11:12 +0200 Subject: [PATCH 2/2] commit with @elastic email