Skip to content

Commit

Permalink
Fix terminal suppressImplicitAnyIndexErrors
Browse files Browse the repository at this point in the history
Part of #76442
  • Loading branch information
Tyriar committed Jul 3, 2019
1 parent 2766709 commit 4f930b9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
const platformKey = osOverride === platform.OperatingSystem.Windows ? 'windows' : osOverride === platform.OperatingSystem.Macintosh ? 'osx' : 'linux';
const shellConfigValue = this._workspaceConfigurationService.inspect<string>(`terminal.integrated.shell.${platformKey}`);
const shellArgsConfigValue = this._workspaceConfigurationService.inspect<string[]>(`terminal.integrated.shellArgs.${platformKey}`);
const envConfigValue = this._workspaceConfigurationService.inspect<string[]>(`terminal.integrated.env.${platformKey}`);
const envConfigValue = this._workspaceConfigurationService.inspect<{ [key: string]: string }>(`terminal.integrated.env.${platformKey}`);

// Check if workspace setting exists and whether it's whitelisted
let isWorkspaceShellAllowed: boolean | undefined = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import * as nls from 'vs/nls';

import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, ColorIdentifier, ColorDefaults } from 'vs/platform/theme/common/colorRegistry';
import { PANEL_BORDER, PANEL_BACKGROUND } from 'vs/workbench/common/theme';

/**
Expand Down Expand Up @@ -37,7 +37,7 @@ export const TERMINAL_BORDER_COLOR = registerColor('terminal.border', {
hc: PANEL_BORDER
}, nls.localize('terminal.border', 'The color of the border that separates split panes within the terminal. This defaults to panel.border.'));

export const ansiColorMap = {
export const ansiColorMap: { [key: string]: { index: number, defaults: ColorDefaults } } = {
'terminal.ansiBlack': {
index: 0,
defaults: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function _getLangEnvVariable(locale?: string) {
if (n === 1) {
// app.getLocale can return just a language without a variant, fill in the variant for
// supported languages as many shells expect a 2-part locale.
const languageVariants = {
const languageVariants: { [key: string]: string } = {
cs: 'CZ',
de: 'DE',
en: 'US',
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/terminal/node/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async function detectAvailableWindowsShells(): Promise<IShellDefinition[]> {
useWSLexe = true;
}

const expectedLocations = {
const expectedLocations: { [key: string]: string[] } = {
'Command Prompt': [`${system32Path}\\cmd.exe`],
PowerShell: [`${system32Path}\\WindowsPowerShell\\v1.0\\powershell.exe`],
'PowerShell Core': [await getShellPathFromRegistry('pwsh')],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function getMainProcessParentEnv(): Promise<IProcessEnvironment> {
});
} while (name === codeProcessName);
const rawEnv = await readFile(`/proc/${pid}/environ`, 'utf8');
const env = {};
const env: IProcessEnvironment = {};
rawEnv.split('\0').forEach(e => {
const i = e.indexOf('=');
env[e.substr(0, i)] = e.substr(i + 1);
Expand Down

0 comments on commit 4f930b9

Please sign in to comment.