kjelsrud.dev/node_modules/astro/dist/runtime/server/render/util.d.ts

27 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
import type { SSRElement } from '../../../@types/astro';
export declare const voidElementNames: RegExp;
export declare const toAttributeString: (value: any, shouldEscape?: boolean) => any;
export declare function defineScriptVars(vars: Record<any, any>): any;
export declare function formatList(values: string[]): string;
export declare function addAttribute(value: any, key: string, shouldEscape?: boolean): any;
export declare function internalSpreadAttributes(values: Record<any, any>, shouldEscape?: boolean): any;
export declare function renderElement(name: string, { props: _props, children }: SSRElement, shouldEscape?: boolean): string;
/**
* This will take an array of async iterables and start buffering them eagerly.
* To avoid useless buffering, it will only start buffering the next tick, so the
* first sync iterables won't be buffered.
*/
export declare function bufferIterators<T>(iterators: AsyncIterable<T>[]): AsyncIterable<T>[];
export declare class EagerAsyncIterableIterator {
#private;
constructor(iterable: AsyncIterable<any>);
/**
* Starts to eagerly fetch the inner iterator and cache the results.
* Note: This might not be called after next() has been called once, e.g. the iterator is started
*/
buffer(): Promise<void>;
next(): Promise<IteratorResult<any, any>>;
isStarted(): boolean;
[Symbol.asyncIterator](): this;
}