mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
1fc83d3ba8
commit
c480b8f2c4
2 changed files with 7 additions and 5 deletions
|
@ -66,10 +66,12 @@ export type SrcSetValue = UnresolvedSrcSetValue & {
|
|||
/**
|
||||
* A yet to be resolved image transform. Used by `getImage`
|
||||
*/
|
||||
export type UnresolvedImageTransform = Simplify<OmitPreservingIndexSignature<ImageTransform, 'src'> & {
|
||||
src: ImageMetadata | string | Promise<{ default: ImageMetadata }>;
|
||||
inferSize?: boolean;
|
||||
}> & {
|
||||
export type UnresolvedImageTransform = Simplify<
|
||||
OmitPreservingIndexSignature<ImageTransform, 'src'> & {
|
||||
src: ImageMetadata | string | Promise<{ default: ImageMetadata }>;
|
||||
inferSize?: boolean;
|
||||
}
|
||||
> & {
|
||||
[isESMImport]?: never;
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ export type OmitIndexSignature<ObjectType> = {
|
|||
|
||||
// This is an alternative `Omit<T, K>` implementation that _doesn't_ remove the index signature of an object.
|
||||
export type OmitPreservingIndexSignature<T, K extends PropertyKey> = {
|
||||
[P in keyof T as Exclude<P, K>]: T[P]
|
||||
[P in keyof T as Exclude<P, K>]: T[P];
|
||||
};
|
||||
|
||||
// Transform a string into its kebab case equivalent (camelCase -> kebab-case). Useful for CSS-in-JS to CSS.
|
||||
|
|
Loading…
Reference in a new issue