function write_ambient(config, mode) {
	const env = get_env(config.env, mode);
	const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env;

	write_if_changed(
		path.join(config.outDir, 'ambient.d.ts'),
		template(env, { public_prefix, private_prefix })
	);
}
Writes ambient declarations including types reference to @sveltejs/kit,
and the existing environment variables in process.env to
$env/static/private and $env/static/public
@param {import('types').ValidatedKitConfig} config
@param {string} mode The Vite mode