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/template/template.d.ts | |
| parent | 53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff) | |
Changed from static to 11ty!
Diffstat (limited to 'node_modules/liquidjs/dist/template/template.d.ts')
| -rw-r--r-- | node_modules/liquidjs/dist/template/template.d.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/node_modules/liquidjs/dist/template/template.d.ts b/node_modules/liquidjs/dist/template/template.d.ts new file mode 100644 index 0000000..a1fba7d --- /dev/null +++ b/node_modules/liquidjs/dist/template/template.d.ts @@ -0,0 +1,36 @@ +import { Context } from '../context/context';
+import { Token } from '../tokens/token';
+import { Emitter } from '../emitters/emitter';
+import { IdentifierToken, QuotedToken, ValueToken } from '../tokens';
+import { Value } from './value';
+export type Argument = Value | ValueToken;
+export type Arguments = Iterable<Argument>;
+/** Scope information used when analyzing partial templates. */
+export interface PartialScope {
+ /**
+ * The name of the partial template. We need this to make sure we only analyze
+ * each template once.
+ * */
+ name: string;
+ /**
+ * If `true`, names in `scope` will be added to a new, isolated scope before
+ * analyzing any child templates, without access to the parent template's scope.
+ */
+ isolated: boolean;
+ /**
+ * A list of names that will be in scope for the child template.
+ *
+ * If an item is a [string, Argument] tuple, the string is considered an alias
+ * for the argument.
+ */
+ scope: Iterable<string | [string, Argument]>;
+}
+export interface Template {
+ token: Token;
+ render(ctx: Context, emitter: Emitter): any;
+ children?(partials: boolean, sync: boolean): Generator<unknown, Template[]>;
+ arguments?(): Arguments;
+ blockScope?(): Iterable<string>;
+ localScope?(): Iterable<IdentifierToken | QuotedToken>;
+ partialScope?(): PartialScope | undefined;
+}
|
