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