提交 2f0271b3 编写于 作者: M Matt Bierner

Fix a few implicit index accesses

上级 eda154a1
......@@ -388,11 +388,11 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
}
/**
* Returns a descriptor suitable for telemetry events or null if none is available.
* Returns a descriptor suitable for telemetry events.
*
* Subclasses should extend if they can contribute.
*/
getTelemetryDescriptor(): object {
getTelemetryDescriptor(): { [key: string]: any } {
/* __GDPR__FRAGMENT__
"EditorTelemetryDescriptor" : {
"typeId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
......
......@@ -23,7 +23,7 @@ suite('Experimental Prompts', () => {
let experimentalPrompt: ExperimentalPrompts;
let onExperimentEnabledEvent: Emitter<IExperiment>;
let storageData = {};
let storageData: { [key: string]: any } = {};
const promptText = 'Hello there! Can you see this?';
const experiment: IExperiment =
{
......
......@@ -56,7 +56,7 @@ suite('ExtHostConfiguration', function () {
assert.equal(extHostConfig.getConfiguration('search.exclude')['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search.exclude').get('**/node_modules'), true);
assert.equal(extHostConfig.getConfiguration('search').get('exclude')!['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search').get<any>('exclude')['**/node_modules'], true);
assert.equal(extHostConfig.getConfiguration('search.exclude').has('**/node_modules'), true);
assert.equal(extHostConfig.getConfiguration('search').has('exclude.**/node_modules'), true);
......@@ -111,7 +111,7 @@ suite('ExtHostConfiguration', function () {
});
let testObject = all.getConfiguration();
let actual = testObject.get('farboo')!;
let actual = testObject.get<any>('farboo')!;
actual['nested']['config1'] = 41;
assert.equal(41, actual['nested']['config1']);
actual['farboo1'] = 'newValue';
......@@ -190,7 +190,7 @@ suite('ExtHostConfiguration', function () {
'config4': ''
}), JSON.stringify(actual));
actual = testObject.get('workbench')!['colorCustomizations']!;
actual = testObject.get<any>('workbench')!['colorCustomizations']!;
actual['statusBar.background'] = 'anothervalue';
assert.deepEqual(JSON.stringify({
'statusBar.foreground': 'somevalue',
......
......@@ -43,9 +43,9 @@ suite('ExtHostTreeView', function () {
let target: RecordingShape;
let onDidChangeTreeNode: Emitter<{ key: string } | undefined>;
let onDidChangeTreeNodeWithId: Emitter<{ key: string }>;
let tree: object;
let labels: object;
let nodes: object;
let tree: { [key: string]: any };
let labels: { [key: string]: string };
let nodes: { [key: string]: { key: string } };
setup(() => {
tree = {
......@@ -392,7 +392,7 @@ suite('ExtHostTreeView', function () {
tree[dupItems['adup1']] = {};
tree['d'] = {};
const bdup1Tree = {};
const bdup1Tree: { [key: string]: any } = {};
bdup1Tree['h'] = {};
bdup1Tree[dupItems['hdup1']] = {};
bdup1Tree['j'] = {};
......@@ -596,7 +596,7 @@ suite('ExtHostTreeView', function () {
}
if (typeof obj === 'object') {
const result = {};
const result: { [key: string]: any } = {};
for (const key of Object.keys(obj)) {
if (obj[key] !== undefined) {
result[key] = removeUnsetKeys(obj[key]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册