Fix terminal suppressImplicitAnyIndexErrors

Part of #76442
This commit is contained in:
Daniel Imms 2019-07-03 10:09:38 -07:00
parent 27667093b4
commit 4f930b907f
5 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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';
/**
@ -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: {

View file

@ -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',

View file

@ -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')],

View file

@ -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);