26 lines
1.4 KiB
TypeScript
26 lines
1.4 KiB
TypeScript
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;
|
|
}
|