0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix(types): Attempt to fix type generation

This commit is contained in:
Princesseuh 2023-02-03 16:51:49 +01:00
parent af1bc13417
commit 063aa276e2
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0
3 changed files with 8 additions and 9 deletions

View file

@ -17,7 +17,6 @@ import type { SerializedSSRManifest } from '../core/app/types';
import type { PageBuildData } from '../core/build/types';
import type { AstroConfigSchema } from '../core/config';
import type { AstroCookies } from '../core/cookies';
import type { LogOptions } from '../core/logger/core';
import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
export type {
@ -1377,11 +1376,6 @@ export interface AstroIntegration {
};
}
export interface AstroPluginOptions {
settings: AstroSettings;
logging: LogOptions;
}
export type RouteType = 'page' | 'endpoint';
export interface RoutePart {

View file

@ -25,8 +25,7 @@ export type OutputFormat = 'avif' | 'png' | 'webp' | 'jpeg' | 'jpg' | 'gif';
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
interface ImageSharedProps
extends WithRequired<Omit<HTMLAttributes<'img'>, 'src' | 'width' | 'height'>, 'alt'> {
interface ImageSharedProps extends Omit<HTMLAttributes<'img'>, 'src' | 'width' | 'height'> {
/**
* Width of the image, the value of this property will be used to assign the `width` property on the final `img` element.
*

View file

@ -1,9 +1,15 @@
import type * as vite from 'vite';
import type { AstroPluginOptions } from '../@types/astro';
import type { AstroSettings } from '../@types/astro.js';
import { LogOptions } from '../core/logger/core.js';
import { VIRTUAL_MODULE_ID } from './consts.js';
const resolvedVirtualModuleId = '\0' + VIRTUAL_MODULE_ID;
interface AstroPluginOptions {
settings: AstroSettings;
logging: LogOptions;
}
export default function assets({ settings, logging }: AstroPluginOptions): vite.Plugin {
return {
name: 'astro:assets',