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

Code before:
	scripts: {
		stage: InjectedScriptStage;
		content: string;
	}[];
	/**
	 * Map of directive name (e.g. `load`) to the directive script code
	 */
	clientDirectives: Map<string, string>;
	devToolbarApps: (DevToolbarAppEntry | string)[];
	middlewares: { pre: string[]; post: string[] };
	tsConfig: TSConfig | undefined;
	tsConfigPath: string | undefined;
	watchFiles: string[];
	timer: AstroTimer;
	dotAstroDir: URL;
	/**
	 * Latest version of Astro, will be undefined if:
	 * - unable to check
	 * - the user has disabled the check
	 * - the check has not completed yet
	 * - the user is on the latest version already
	 */
	latestAstroVersion: string | undefined;
	serverIslandMap: NonNullable<SSRManifest['serverIslandMap']>;
	serverIslandNameMap: NonNullable<SSRManifest['serverIslandNameMap']>;
	// This makes content optional. Internal only so it's optional on InjectedType
	injectedTypes: Array<Omit<InjectedType, 'content'> & Partial<Pick<InjectedType, 'content'>>>;
	/**
	 * Determine if the build output should be a static, dist folder or a adapter-based server output
	 * undefined when unknown
	 */
	buildOutput: undefined | 'static' | 'server';
}

/** Generic interface for a component (Astro, Svelte, React, etc.) */
export interface ComponentInstance {
	default: AstroComponentFactory;
	css?: string[];
	partial?: boolean;
	prerender?: boolean;
	getStaticPaths?: (options: GetStaticPathsOptions) => GetStaticPathsResult;
}

export interface ManifestData {
	routes: RouteData[];
}

export interface AstroPluginOptions {
	settings: AstroSettings;
	logger: Logger;
}

Review comment (suggestion):
```suggestion
	// This makes content optional. Internal only so it's not optional on InjectedType
```

Code after:
	scripts: {
		stage: InjectedScriptStage;
		content: string;
	}[];
	/**
	 * Map of directive name (e.g. `load`) to the directive script code
	 */
	clientDirectives: Map<string, string>;
	devToolbarApps: (DevToolbarAppEntry | string)[];
	middlewares: { pre: string[]; post: string[] };
	tsConfig: TSConfig | undefined;
	tsConfigPath: string | undefined;
	watchFiles: string[];
	timer: AstroTimer;
	dotAstroDir: URL;
	/**
	 * Latest version of Astro, will be undefined if:
	 * - unable to check
	 * - the user has disabled the check
	 * - the check has not completed yet
	 * - the user is on the latest version already
	 */
	latestAstroVersion: string | undefined;
	serverIslandMap: NonNullable<SSRManifest['serverIslandMap']>;
	serverIslandNameMap: NonNullable<SSRManifest['serverIslandNameMap']>;
	// This makes content optional. Internal only so it's not optional on InjectedType
	injectedTypes: Array<Omit<InjectedType, 'content'> & Partial<Pick<InjectedType, 'content'>>>;
	/**
	 * Determine if the build output should be a static, dist folder or a adapter-based server output
	 * undefined when unknown
	 */
	buildOutput: undefined | 'static' | 'server';
}

/** Generic interface for a component (Astro, Svelte, React, etc.) */
export interface ComponentInstance {
	default: AstroComponentFactory;
	css?: string[];
	partial?: boolean;
	prerender?: boolean;
	getStaticPaths?: (options: GetStaticPathsOptions) => GetStaticPathsResult;
}

export interface ManifestData {
	routes: RouteData[];
}

export interface AstroPluginOptions {
	settings: AstroSettings;
	logger: Logger;
}