UNPKG

surfstar

Version:

A modern template engine for Bun, inspired by Handlebars and EJS, with a focus on simplicity and performance.

55 lines (52 loc) 1.53 kB
// Generated by dts-bundle-generator v8.1.2 export declare enum SurfstarErrorType { LEXER_ERROR = "LEXER_ERROR", PARSER_ERROR = "PARSER_ERROR", RENDERER_ERROR = "RENDERER_ERROR", FILE_ERROR = "FILE_ERROR", COMPILATION_ERROR = "COMPILATION_ERROR" } export interface SurfstarErrorOptions { message: string; type: SurfstarErrorType; filePath?: string; lineNumber?: number; columnNumber?: number; originalError?: Error; } export declare class SurfstarError extends Error { readonly type: SurfstarErrorType; readonly filePath?: string; readonly lineNumber?: number; readonly columnNumber?: number; readonly originalError?: Error; constructor(options: SurfstarErrorOptions); static lexerError(message: string, options?: { filePath?: string; lineNumber?: number; columnNumber?: number; originalError?: Error; }): SurfstarError; static parserError(message: string, options?: { filePath?: string; lineNumber?: number; columnNumber?: number; originalError?: Error; }): SurfstarError; static rendererError(message: string, options?: { filePath?: string; lineNumber?: number; columnNumber?: number; originalError?: Error; }): SurfstarError; static fileError(message: string, options?: { filePath?: string; originalError?: Error; }): SurfstarError; static compilationError(message: string, options?: { filePath?: string; originalError?: Error; }): SurfstarError; } export declare function compileTemplate(filePath: string, data: Record<string, any>): Promise<string>; export {};