Skip to content

Commit

Permalink
fix(types): Attempt to fix type generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Feb 3, 2023
1 parent af1bc13 commit 063aa27
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 0 additions & 6 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -1377,11 +1376,6 @@ export interface AstroIntegration {
};
}

export interface AstroPluginOptions {
settings: AstroSettings;
logging: LogOptions;
}

export type RouteType = 'page' | 'endpoint';

export interface RoutePart {
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/src/assets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 7 additions & 1 deletion packages/astro/src/assets/vite-plugin-assets.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 063aa27

Please sign in to comment.