diff options
| author | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
|---|---|---|
| committer | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
| commit | 7a52ddeba2a68388b544f529d2d92104420f77b0 (patch) | |
| tree | 15ddd47457a2cb4a96060747437d36474e4f6b4e /node_modules/liquidjs/dist/context | |
| parent | 53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff) | |
Changed from static to 11ty!
Diffstat (limited to 'node_modules/liquidjs/dist/context')
| -rw-r--r-- | node_modules/liquidjs/dist/context/block-mode.d.ts | 4 | ||||
| -rw-r--r-- | node_modules/liquidjs/dist/context/context.d.ts | 64 | ||||
| -rw-r--r-- | node_modules/liquidjs/dist/context/context.spec.d.ts | 1 | ||||
| -rw-r--r-- | node_modules/liquidjs/dist/context/index.d.ts | 3 | ||||
| -rw-r--r-- | node_modules/liquidjs/dist/context/scope.d.ts | 6 |
5 files changed, 78 insertions, 0 deletions
diff --git a/node_modules/liquidjs/dist/context/block-mode.d.ts b/node_modules/liquidjs/dist/context/block-mode.d.ts new file mode 100644 index 0000000..428746e --- /dev/null +++ b/node_modules/liquidjs/dist/context/block-mode.d.ts @@ -0,0 +1,4 @@ +export declare enum BlockMode {
+ OUTPUT = 0,
+ STORE = 1
+}
diff --git a/node_modules/liquidjs/dist/context/context.d.ts b/node_modules/liquidjs/dist/context/context.d.ts new file mode 100644 index 0000000..c359993 --- /dev/null +++ b/node_modules/liquidjs/dist/context/context.d.ts @@ -0,0 +1,64 @@ +import { Drop } from '../drop/drop';
+import { NormalizedFullOptions, RenderOptions } from '../liquid-options';
+import { Scope } from './scope';
+import { Limiter } from '../util';
+type PropertyKey = string | number;
+export declare class Context {
+ /**
+ * insert a Context-level empty scope,
+ * for tags like `{% capture %}` `{% assign %}` to operate
+ */
+ private scopes;
+ private registers;
+ /**
+ * user passed in scope
+ * `{% increment %}`, `{% decrement %}` changes this scope,
+ * whereas `{% capture %}`, `{% assign %}` only hide this scope
+ */
+ environments: Scope;
+ /**
+ * global scope used as fallback for missing variables
+ */
+ globals: Scope;
+ sync: boolean;
+ breakCalled: boolean;
+ continueCalled: boolean;
+ /**
+ * The normalized liquid options object
+ */
+ opts: NormalizedFullOptions;
+ /**
+ * Throw when accessing undefined variable?
+ */
+ strictVariables: boolean;
+ ownPropertyOnly: boolean;
+ memoryLimit: Limiter;
+ renderLimit: Limiter;
+ constructor(env?: object, opts?: NormalizedFullOptions, renderOptions?: RenderOptions, { memoryLimit, renderLimit }?: {
+ [key: string]: Limiter;
+ });
+ getRegister(key: string): any;
+ setRegister(key: string, value: any): any;
+ saveRegister(...keys: string[]): [string, any][];
+ restoreRegister(keyValues: [string, any][]): void;
+ getAll(): Scope;
+ /**
+ * @deprecated use `_get()` or `getSync()` instead
+ */
+ get(paths: PropertyKey[]): unknown;
+ getSync(paths: PropertyKey[]): unknown;
+ _get(paths: (PropertyKey | Drop)[]): IterableIterator<unknown>;
+ /**
+ * @deprecated use `_get()` instead
+ */
+ getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
+ _getFromScope(scope: unknown, paths: (PropertyKey | Drop)[] | string, strictVariables?: boolean): IterableIterator<unknown>;
+ push(ctx: object): number;
+ pop(): Scope | undefined;
+ bottom(): Scope;
+ spawn(scope?: {}): Context;
+ private findScope;
+ readProperty(obj: Scope, key: (PropertyKey | Drop)): any;
+}
+export declare function readJSProperty(obj: Scope, key: PropertyKey, ownPropertyOnly: boolean): any;
+export {};
diff --git a/node_modules/liquidjs/dist/context/context.spec.d.ts b/node_modules/liquidjs/dist/context/context.spec.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/node_modules/liquidjs/dist/context/context.spec.d.ts @@ -0,0 +1 @@ +export {};
diff --git a/node_modules/liquidjs/dist/context/index.d.ts b/node_modules/liquidjs/dist/context/index.d.ts new file mode 100644 index 0000000..2a8b56f --- /dev/null +++ b/node_modules/liquidjs/dist/context/index.d.ts @@ -0,0 +1,3 @@ +export * from './context';
+export * from './scope';
+export * from './block-mode';
diff --git a/node_modules/liquidjs/dist/context/scope.d.ts b/node_modules/liquidjs/dist/context/scope.d.ts new file mode 100644 index 0000000..4257c6b --- /dev/null +++ b/node_modules/liquidjs/dist/context/scope.d.ts @@ -0,0 +1,6 @@ +import { Drop } from '../drop/drop';
+interface ScopeObject extends Record<string, any> {
+ toLiquid?: () => any;
+}
+export type Scope = ScopeObject | Drop;
+export {};
|
