@stacksjs/stx
Version:
A Bun plugin that allows for using Laravel Blade-like syntax.
14 lines (13 loc) • 746 B
TypeScript
import type { CustomDirective, StreamRenderer, StreamingConfig, StxOptions } from './types';
declare const defaultStreamingConfig: StreamingConfig;
export declare function streamTemplate(templatePath: string,
data: Record<string, any> = {},
options: StxOptions = {},): Promise<ReadableStream<string>>;
export declare function createStreamRenderer(templatePath: string,
options: StxOptions = {},): Promise<StreamRenderer>;
export declare const islandDirective: CustomDirective;
export declare function registerStreamingDirectives(options: StxOptions = {}): CustomDirective[];
export declare function processSectionDirectives(content: string,
context: Record<string, any>,
filePath: string,
options: StxOptions = {},): Promise<string>;