diff2html 3.4.55 → 3.4.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ declare module '@profoundlogic/hogan' {
2
+ export interface Context {
3
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+ [key: string]: any;
5
+ }
6
+
7
+ export interface SectionTags {
8
+ o: string;
9
+ c: string;
10
+ }
11
+
12
+ export interface HoganOptions {
13
+ asString?: boolean | undefined;
14
+ sectionTags?: readonly SectionTags[] | undefined;
15
+ delimiters?: string | undefined;
16
+ disableLambda?: boolean | undefined;
17
+ }
18
+
19
+ export interface Token {
20
+ tag: string;
21
+ otag?: string | undefined;
22
+ ctag?: string | undefined;
23
+ i?: number | undefined;
24
+ n?: string | undefined;
25
+ text?: string | undefined;
26
+ }
27
+
28
+ export interface Leaf extends Token {
29
+ end: number;
30
+ nodes: Token[];
31
+ }
32
+
33
+ export type Tree = Leaf[];
34
+
35
+ export interface Partials {
36
+ [symbol: string]: HoganTemplate;
37
+ }
38
+
39
+ export class HoganTemplate {
40
+ render(context: Context, partials?: Partials, indent?: string): string;
41
+ }
42
+
43
+ export { HoganTemplate as Template, HoganTemplate as template };
44
+
45
+ export function compile(text: string, options?: HoganOptions & { asString: false }): HoganTemplate;
46
+ export function compile(text: string, options?: HoganOptions & { asString: true }): string;
47
+ export function compile(text: string, options?: HoganOptions): HoganTemplate | string;
48
+
49
+ export function scan(text: string, delimiters?: string): Token[];
50
+
51
+ export function parse(tokens: readonly Token[], text?: undefined, options?: HoganOptions): Tree;
52
+ }