extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts/generatePatchedEnv
function generatePatchedEnv(env: any, modulePath: string): any {
	const newEnv = Object.assign({}, env);

	newEnv['ELECTRON_RUN_AS_NODE'] = '1';
	newEnv['NODE_PATH'] = path.join(modulePath, '..', '..', '..');

	// Ensure we always have a PATH set
	newEnv['PATH'] = newEnv['PATH'] || process.env.PATH;

	return newEnv;
}