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
09c1e586ee
commit
45bec97d28
4 changed files with 20 additions and 16 deletions
|
@ -15,7 +15,7 @@ export interface HydrationMetadata {
|
||||||
value: string;
|
value: string;
|
||||||
componentUrl: string;
|
componentUrl: string;
|
||||||
componentExport: { value: string };
|
componentExport: { value: string };
|
||||||
};
|
}
|
||||||
|
|
||||||
interface ExtractedProps {
|
interface ExtractedProps {
|
||||||
isPage: boolean;
|
isPage: boolean;
|
||||||
|
|
|
@ -230,7 +230,11 @@ export async function renderComponent(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Component && (Component as any).isAstroComponentFactory) {
|
if (Component && (Component as any).isAstroComponentFactory) {
|
||||||
async function* renderAstroComponentInline(): AsyncGenerator<string | RenderInstruction, void, undefined> {
|
async function* renderAstroComponentInline(): AsyncGenerator<
|
||||||
|
string | RenderInstruction,
|
||||||
|
void,
|
||||||
|
undefined
|
||||||
|
> {
|
||||||
let iterable = await renderToIterable(result, Component as any, _props, slots);
|
let iterable = await renderToIterable(result, Component as any, _props, slots);
|
||||||
yield* iterable;
|
yield* iterable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ import {
|
||||||
escapeHTML,
|
escapeHTML,
|
||||||
HTMLString,
|
HTMLString,
|
||||||
markHTMLString,
|
markHTMLString,
|
||||||
RenderInstruction,
|
|
||||||
renderComponent,
|
renderComponent,
|
||||||
|
RenderInstruction,
|
||||||
renderToString,
|
renderToString,
|
||||||
spreadAttributes,
|
spreadAttributes,
|
||||||
stringifyChunk,
|
stringifyChunk,
|
||||||
|
|
|
@ -11,7 +11,7 @@ export function determineIfNeedsHydrationScript(result: SSRResult): boolean {
|
||||||
if (result._metadata.hasHydrationScript) {
|
if (result._metadata.hasHydrationScript) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return result._metadata.hasHydrationScript = true;
|
return (result._metadata.hasHydrationScript = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const hydrationScripts: Record<string, string> = {
|
export const hydrationScripts: Record<string, string> = {
|
||||||
|
|
Loading…
Reference in a new issue