1 | import { NormalizedFullOptions, RenderOptions } from '../liquid-options';
|
2 | import { Scope } from './scope';
|
3 | import { Limiter } from '../util';
|
4 | type PropertyKey = string | number;
|
5 | export declare class Context {
|
6 | |
7 |
|
8 |
|
9 |
|
10 | private scopes;
|
11 | private registers;
|
12 | |
13 |
|
14 |
|
15 |
|
16 |
|
17 | environments: Scope;
|
18 | |
19 |
|
20 |
|
21 | globals: Scope;
|
22 | sync: boolean;
|
23 | |
24 |
|
25 |
|
26 | opts: NormalizedFullOptions;
|
27 | |
28 |
|
29 |
|
30 | strictVariables: boolean;
|
31 | ownPropertyOnly: boolean;
|
32 | memoryLimit: Limiter;
|
33 | renderLimit: Limiter;
|
34 | constructor(env?: object, opts?: NormalizedFullOptions, renderOptions?: RenderOptions, { memoryLimit, renderLimit }?: {
|
35 | [key: string]: Limiter;
|
36 | });
|
37 | getRegister(key: string): any;
|
38 | setRegister(key: string, value: any): any;
|
39 | saveRegister(...keys: string[]): [string, any][];
|
40 | restoreRegister(keyValues: [string, any][]): void;
|
41 | getAll(): Scope;
|
42 | /**
|
43 | * @deprecated use `_get()` or `getSync()` instead
|
44 | */
|
45 | get(paths: PropertyKey[]): unknown;
|
46 | getSync(paths: PropertyKey[]): unknown;
|
47 | _get(paths: PropertyKey[]): IterableIterator<unknown>;
|
48 | /**
|
49 | * @deprecated use `_get()` instead
|
50 | */
|
51 | getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
|
52 | _getFromScope(scope: unknown, paths: PropertyKey[] | string, strictVariables?: boolean): IterableIterator<unknown>;
|
53 | push(ctx: object): number;
|
54 | pop(): Scope | undefined;
|
55 | bottom(): Scope;
|
56 | spawn(scope?: {}): Context;
|
57 | private findScope;
|
58 | }
|
59 | export declare function readProperty(obj: Scope, key: PropertyKey, ownPropertyOnly: boolean): any;
|
60 | export declare function readJSProperty(obj: Scope, key: PropertyKey, ownPropertyOnly: boolean): any;
|
61 | export {};
|