From 58145651f791272d683a293ca515d30dc0011bbc Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Sun, 19 Jan 2025 10:02:50 -0600 Subject: [PATCH] use type vs object (#238187) use object type instead --- extensions/terminal-suggest/src/helpers/executable.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/terminal-suggest/src/helpers/executable.ts b/extensions/terminal-suggest/src/helpers/executable.ts index 20f936fb5b1..e93c7781901 100644 --- a/extensions/terminal-suggest/src/helpers/executable.ts +++ b/extensions/terminal-suggest/src/helpers/executable.ts @@ -6,7 +6,7 @@ import { osIsWindows } from './os'; import * as fs from 'fs/promises'; -export async function isExecutable(filePath: string, configuredWindowsExecutableExtensions?: Object): Promise { +export async function isExecutable(filePath: string, configuredWindowsExecutableExtensions?: { [key: string]: boolean | undefined }): Promise { if (osIsWindows()) { const resolvedWindowsExecutableExtensions = resolveWindowsExecutableExtensions(configuredWindowsExecutableExtensions); return resolvedWindowsExecutableExtensions.find(ext => filePath.endsWith(ext)) !== undefined; @@ -21,7 +21,8 @@ export async function isExecutable(filePath: string, configuredWindowsExecutable } } -function resolveWindowsExecutableExtensions(configuredWindowsExecutableExtensions?: Object): string[] { + +function resolveWindowsExecutableExtensions(configuredWindowsExecutableExtensions?: { [key: string]: boolean | undefined }): string[] { const resolvedWindowsExecutableExtensions: string[] = windowsDefaultExecutableExtensions; const excluded = new Set(); if (configuredWindowsExecutableExtensions) {