mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
7.0.1
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import Scope from 'src/scope/scope';
|
||||
declare type impl = (value: any, ...args: any[]) => any;
|
||||
export default class Filter {
|
||||
name: string;
|
||||
impl: impl;
|
||||
args: string[];
|
||||
private static impls;
|
||||
constructor(str: string, strictFilters?: boolean);
|
||||
parseArgs(argList: string): string[];
|
||||
render(value: any, scope: Scope): any;
|
||||
static register(name: any, filter: any): void;
|
||||
static clear(): void;
|
||||
}
|
||||
export {};
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import Template from 'src/template/template';
|
||||
import ITemplate from 'src/template/itemplate';
|
||||
import Token from 'src/parser/token';
|
||||
export default class extends Template implements ITemplate {
|
||||
str: string;
|
||||
constructor(token: Token);
|
||||
render(): Promise<string>;
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import Scope from 'src/scope/scope';
|
||||
import Token from 'src/parser/token';
|
||||
export default interface ITemplate {
|
||||
token: Token;
|
||||
render(scope: Scope): Promise<string>;
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import Value from './value';
|
||||
import Template from 'src/template/template';
|
||||
import ITemplate from 'src/template/itemplate';
|
||||
import Scope from 'src/scope/scope';
|
||||
import OutputToken from 'src/parser/output-token';
|
||||
export default class Output extends Template implements ITemplate {
|
||||
value: Value;
|
||||
constructor(token: OutputToken, strictFilters?: boolean);
|
||||
render(scope: Scope): Promise<string>;
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Key-Value Pairs Representing Tag Arguments
|
||||
* Example:
|
||||
* For the markup `{% include 'head.html' foo='bar' %}`,
|
||||
* hash['foo'] === 'bar'
|
||||
*/
|
||||
export default class Hash {
|
||||
[key: string]: any;
|
||||
constructor(markup: any, scope: any);
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import Scope from 'src/scope/scope';
|
||||
import TagToken from 'src/parser/tag-token';
|
||||
import Token from 'src/parser/token';
|
||||
import Hash from 'src/template/tag/hash';
|
||||
import ITagImpl from './itag-impl';
|
||||
export default interface ITagImplOptions {
|
||||
parse?: (this: ITagImpl, token: TagToken, remainingTokens: Array<Token>) => void;
|
||||
render?: (this: ITagImpl, scope: Scope, hash: Hash) => any | Promise<any>;
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import Liquid from 'src/liquid';
|
||||
import ITagImplOptions from './itag-impl-options';
|
||||
export default interface ITagImpl extends ITagImplOptions {
|
||||
liquid: Liquid;
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
import Scope from 'src/scope/scope';
|
||||
import ITagImplOptions from './itag-impl-options';
|
||||
import Liquid from 'src/liquid';
|
||||
import Template from 'src/template/template';
|
||||
import ITemplate from 'src/template/itemplate';
|
||||
import TagToken from 'src/parser/tag-token';
|
||||
import Token from 'src/parser/token';
|
||||
export default class Tag extends Template implements ITemplate {
|
||||
name: string;
|
||||
token: TagToken;
|
||||
private impl;
|
||||
static impls: {
|
||||
[key: string]: ITagImplOptions;
|
||||
};
|
||||
constructor(token: TagToken, tokens: Token[], liquid: Liquid);
|
||||
render(scope: Scope): Promise<string>;
|
||||
static register(name: string, tag: ITagImplOptions): void;
|
||||
static clear(): void;
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import Token from 'src/parser/token';
|
||||
export default class Template {
|
||||
token: Token;
|
||||
constructor(token: any);
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import Scope from 'src/scope/scope';
|
||||
export default class {
|
||||
initial: any;
|
||||
filters: Array<any>;
|
||||
constructor(str: string, strictFilters?: boolean);
|
||||
value(scope: Scope): any;
|
||||
}
|
||||
Reference in New Issue
Block a user