Repository: withastro/astro
File: packages/astro/src/types/public/config.ts (TypeScript)

Code before:
						 *
						 * A list of resources applied to the `style-src` directive. These resources are added to all pages and will override Astro's defaults.
						 *
			       * ```js
			       * import { defineConfig } from 'astro/config';
				     *
			       * export default defineConfig({
             *   experimental: {
             *     csp: {
             *       styleDirective: {
             *         resources: [
             *           "self",
             *           "https://styles.cdn.example.com"
             *         ]
             *       }
             *     }
             *   }
             * });
             * ```
						 */
						resources?: string[];
					};

					/**
					 * @name experimental.csp.scriptDirective
					 * @type {CspHash[]}
					 * @default `undefined`
					 * @version 5.9.0
					 * @description
					 *
					 * A configuration object that allows you to override the default sources for the `script-src` directive
			     * with the `resources` property, or to provide additional `hashes` to be rendered.
				   *
           * These properties are added to all pages and completeley override Astro's default resources, not add to them.
					 * Therefore, you must explicitly specify any default values that you want to be included.				 *
					 */
					scriptDirective?: {
						/**
						 * @name experimental.csp.scriptDirective.hashes
						 * @type {CspHash[]}
						 * @default `[]`
						 * @version 5.9.0
						 * @description
						 *
						 * A list of additional hashes added to the `sript-src` directive.
             *
             * If you have external scripts that aren't generated by Astro, or inline scripts, this configuration option allows you to provide additional hashes to be rendered. 
             *
             * You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages.
						 *	   
						 * ```js

Review comment (refactor):
I think the `scriptDirective` type should be:
```suggestion
					 * @type {{ hashes?: CspHash[], resources?: string[], strictDynamic?: boolean }}
```
Or if this is too long we could use `object`. `CspHash[]` is the type for `hashes`, not `scriptDirective`.

Code after:
						 *
						 * A list of resources applied to the `style-src` directive. These resources are added to all pages and will override Astro's defaults.
						 *
						 * ```js
						 * import { defineConfig } from 'astro/config';
						 *
						 * export default defineConfig({
						 *   experimental: {
						 *     csp: {
						 *       styleDirective: {
						 *         resources: [
						 *           "self",
						 *           "https://styles.cdn.example.com"
						 *         ]
						 *       }
						 *     }
						 *   }
						 * });
						 * ```
						 */
						resources?: string[];
					};

					/**
					 * @name experimental.csp.scriptDirective
					 * @type {{ hashes?: CspHash[], resources?: string[], strictDynamic?: boolean }}
					 * @default `undefined`
					 * @version 5.9.0
					 * @description
					 *
					 * A configuration object that allows you to override the default sources for the `script-src` directive
					 * with the `resources` property, or to provide additional `hashes` to be rendered.
					 *
					 * These properties are added to all pages and completely override Astro's default resources, not add to them.
					 * Therefore, you must explicitly specify any default values that you want to be included.
					 *
					 */
					scriptDirective?: {
						/**
						 * @name experimental.csp.scriptDirective.hashes
						 * @type {CspHash[]}
						 * @default `[]`
						 * @version 5.9.0
						 * @description
						 *
						 * A list of additional hashes added to the `script-src` directive.
						 *
						 * If you have external scripts that aren't generated by Astro, or inline scripts, this configuration option allows you to provide additional hashes to be rendered. 
						 *
						 * You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages.
						 *