Expected an assignment or function call and instead saw an expression for "myvar?.myfunction()

Template for a good false-positive report, formatted with Markdown:

	camelKIntegrationsTreeView = vscode.window.createTreeView('camelk.integrations', {
		treeDataProvider: camelKIntegrationsProvider
	});
	camelKIntegrationsTreeView.onDidChangeVisibility(async () => {
		if (camelKIntegrationsTreeView.visible === true) {
			if (runningKubectl === undefined || runningKubectl.killed) {
				eventEmitter.emit(restartKubectlWatchEvent);
			}
			await camelKIntegrationsProvider.refresh().catch(err => console.log(err));
		} else {
			runningKubectl?.kill(); <--- error here, runningKubectl is of type ChildProcess from child_process
		}
	});
}```

Hello @apupier,

I believe you are facing the same issue as reported here:

Feel free to come back to us if you face another issue.

Best,
Quentin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.