derby
Version:
MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers.
23 lines (22 loc) • 1.03 kB
TypeScript
import { App } from '../App';
import { templates } from '../templates';
import { View } from '../templates/templates';
export { createPathExpression } from './createPathExpression';
export { markup } from './markup';
declare module '../App' {
interface AppForClient {
addViews(file: string, namespace: string): void;
}
}
interface ParsedView {
name: string;
source: string;
options: unknown;
filename?: string;
}
export declare function createTemplate(source: string, view: View): templates.Template;
export declare function createStringTemplate(source: string, view: View): templates.Template;
export declare function createExpression(source: string): any;
export declare function getImportNamespace(namespace: string, attrs: Record<string, string>, importFilename: string): string;
export declare function parseViews(file: string, namespace: string, filename?: string, onImport?: (attrs: any) => void): ParsedView[];
export declare function registerParsedViews(app: App, items: ParsedView[]): void;