Repository: withastro/astro
File: packages/astro/src/core/config/schemas/base.ts (TypeScript)

Code before:
				})
				.default(ASTRO_CONFIG_DEFAULTS.image.service),
			domains: z.array(z.string()).default([]),
			remotePatterns: z
				.array(
					z.object({
						protocol: z.string().optional(),
						hostname: z.string().optional(),
						port: z.string().optional(),
						pathname: z.string().optional(),
					}),
				)
				.default([]),
			experimentalLayout: z.enum(['constrained', 'fixed', 'full-width', 'none']).optional(),
			experimentalObjectFit: z.string().optional(),
			experimentalObjectPosition: z.string().optional(),
			experimentalBreakpoints: z.array(z.number()).optional(),
			experimentalDefaultStyles: z
				.boolean()
				.default(ASTRO_CONFIG_DEFAULTS.image.experimentalDefaultStyles),
		})
		.default(ASTRO_CONFIG_DEFAULTS.image),
	svg: z
		.object({
			optimize: z.boolean().default(true),
			svgoConfig: z.record(z.any()).optional(),
		})
		.optional(),
	devToolbar: z
		.object({
			enabled: z.boolean().default(ASTRO_CONFIG_DEFAULTS.devToolbar.enabled),
		})
		.default(ASTRO_CONFIG_DEFAULTS.devToolbar),
	markdown: z
		.object({
			syntaxHighlight: z
				.union([
					z
						.object({
							type: highlighterTypesSchema,
							excludeLangs: z
								.array(z.string())
								.optional()
								.default(syntaxHighlightDefaults.excludeLangs),
						})
						.default(syntaxHighlightDefaults),
					highlighterTypesSchema,
					z.literal(false),
				])
				.default(ASTRO_CONFIG_DEFAULTS.markdown.syntaxHighlight),
			shikiConfig: z

Review comment (suggestion):
I think we should offer at least proper typing here even if we don’t do full schema validation. For example, if a type is available for the SVGO options, we could use something like:
```js
			svgoConfig: z.custom<SVGOOptions>((value) => value && typeof value === 'object').optional(),
```
That way users should get a nice editor experience.

Code after:
					entrypoint: z
						.union([z.literal('astro/assets/services/sharp'), z.string()])
						.default(ASTRO_CONFIG_DEFAULTS.image.service.entrypoint),
					config: z.record(z.any()).default({}),
				})
				.default(ASTRO_CONFIG_DEFAULTS.image.service),
			domains: z.array(z.string()).default([]),
			remotePatterns: z
				.array(
					z.object({
						protocol: z.string().optional(),
						hostname: z.string().optional(),
						port: z.string().optional(),
						pathname: z.string().optional(),
					}),
				)
				.default([]),
			layout: z.enum(['constrained', 'fixed', 'full-width', 'none']).optional(),
			objectFit: z.string().optional(),
			objectPosition: z.string().optional(),
			breakpoints: z.array(z.number()).optional(),
			responsiveStyles: z.boolean().default(ASTRO_CONFIG_DEFAULTS.image.responsiveStyles),
		})
		.default(ASTRO_CONFIG_DEFAULTS.image),
	devToolbar: z
		.object({
			enabled: z.boolean().default(ASTRO_CONFIG_DEFAULTS.devToolbar.enabled),
		})
		.default(ASTRO_CONFIG_DEFAULTS.devToolbar),
	markdown: z
		.object({
			syntaxHighlight: z
				.union([
					z
						.object({
							type: highlighterTypesSchema,
							excludeLangs: z
								.array(z.string())
								.optional()
								.default(syntaxHighlightDefaults.excludeLangs),
						})
						.default(syntaxHighlightDefaults),
					highlighterTypesSchema,
					z.literal(false),
				])
				.default(ASTRO_CONFIG_DEFAULTS.markdown.syntaxHighlight),
			shikiConfig: z
				.object({
					langs: z
						.custom<ShikiLang>()
						.array()