function write_types(config, manifest_data, file) {
	if (!ts) return;

	if (!path.basename(file).startsWith('+')) {
		// Not a route file
		return;
	}

	const id = '/' + posixify(path.relative(config.kit.files.routes, path.dirname(file)));

	const route = manifest_data.routes.find((route) => route.id === id);
	if (!route) return;
	if (!route.leaf && !route.layout && !route.endpoint) return; // nothing to do

	update_types(config, create_routes_map(manifest_data), route);
}
Creates types related to the given file. This should only be called
if the file in question was edited, not if it was created/deleted/moved.
@param {import('types').ValidatedConfig} config
@param {import('types').ManifestData} manifest_data
@param {string} file