feat: customize globals & strictVariables when calling render, see #432

This commit is contained in:
Harttle
2021-12-11 20:22:58 +08:00
committed by Harttle
parent 6023d9ba10
commit 6801552fe6
6 changed files with 60 additions and 27 deletions
+15
View File
@@ -65,6 +65,21 @@ export interface LiquidOptions {
orderedFilterParameters?: boolean;
}
export interface RenderOptions {
/**
* This call is sync or async? It's used by Liquid internal methods, you'll not need this.
*/
sync?: boolean;
/**
* Same as `globals` on LiquidOptions, but only for current render() call
*/
globals?: object;
/**
* Same as `strictVariables` on LiquidOptions, but only for current render() call
*/
strictVariables?: boolean;
}
interface NormalizedOptions extends LiquidOptions {
root?: string[];
partials?: string[];