mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix a few more implicit index accessor errors
This commit is contained in:
parent
c089daa858
commit
0aaf00bb6a
|
@ -131,11 +131,13 @@ export interface IDefaultConfigurationExtension {
|
|||
defaults: { [key: string]: {} };
|
||||
}
|
||||
|
||||
export const allSettings: { properties: {}, patternProperties: {} } = { properties: {}, patternProperties: {} };
|
||||
export const applicationSettings: { properties: {}, patternProperties: {} } = { properties: {}, patternProperties: {} };
|
||||
export const machineSettings: { properties: {}, patternProperties: {} } = { properties: {}, patternProperties: {} };
|
||||
export const windowSettings: { properties: {}, patternProperties: {} } = { properties: {}, patternProperties: {} };
|
||||
export const resourceSettings: { properties: {}, patternProperties: {} } = { properties: {}, patternProperties: {} };
|
||||
type SettingProperties = { [key: string]: any };
|
||||
|
||||
export const allSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
export const applicationSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
export const machineSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
export const windowSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
export const resourceSettings: { properties: SettingProperties, patternProperties: SettingProperties } = { properties: {}, patternProperties: {} };
|
||||
|
||||
export const editorConfigurationSchemaId = 'vscode://schemas/settings/editor';
|
||||
const contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
|
@ -469,7 +471,7 @@ export function validateProperty(property: string): string | null {
|
|||
}
|
||||
|
||||
export function getScopes(): { [key: string]: ConfigurationScope } {
|
||||
const scopes = {};
|
||||
const scopes: { [key: string]: ConfigurationScope } = {};
|
||||
const configurationProperties = configurationRegistry.getConfigurationProperties();
|
||||
for (const key of Object.keys(configurationProperties)) {
|
||||
scopes[key] = configurationProperties[key].scope;
|
||||
|
|
|
@ -113,7 +113,7 @@ suite('ExtensionsListView Tests', () => {
|
|||
instantiationService.stubPromise(IExtensionTipsService, 'getOtherRecommendations', [
|
||||
{ extensionId: otherRecommendationA.identifier.id }
|
||||
]);
|
||||
const reasons = {};
|
||||
const reasons: { [key: string]: any } = {};
|
||||
reasons[workspaceRecommendationA.identifier.id] = { reasonId: ExtensionRecommendationReason.Workspace };
|
||||
reasons[workspaceRecommendationB.identifier.id] = { reasonId: ExtensionRecommendationReason.Workspace };
|
||||
reasons[fileBasedRecommendationA.identifier.id] = { reasonId: ExtensionRecommendationReason.File };
|
||||
|
|
|
@ -11,14 +11,14 @@ import { IStringDictionary } from 'vs/base/common/collections';
|
|||
|
||||
suite('Workbench - TerminalEnvironment', () => {
|
||||
test('addTerminalEnvironmentKeys', () => {
|
||||
const env = { FOO: 'bar' };
|
||||
const env: { [key: string]: any } = { FOO: 'bar' };
|
||||
const locale = 'en-au';
|
||||
terminalEnvironment.addTerminalEnvironmentKeys(env, '1.2.3', locale, true);
|
||||
assert.equal(env['TERM_PROGRAM'], 'vscode');
|
||||
assert.equal(env['TERM_PROGRAM_VERSION'], '1.2.3');
|
||||
assert.equal(env['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
|
||||
|
||||
const env2 = { FOO: 'bar' };
|
||||
const env2: { [key: string]: any } = { FOO: 'bar' };
|
||||
terminalEnvironment.addTerminalEnvironmentKeys(env2, '1.2.3', undefined, true);
|
||||
assert.equal(env2['LANG'], 'en_US.UTF-8', 'LANG is equal to en_US.UTF-8 as fallback.'); // More info on issue #14586
|
||||
|
||||
|
|
Loading…
Reference in a new issue