refactor: Tag class support in registerTag()

This commit is contained in:
Jun Yang
2022-11-27 14:04:01 +08:00
parent 1f6ce7c822
commit 92992689cd
145 changed files with 694 additions and 768 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
enum BlockMode {
export enum BlockMode {
/* store rendered html into blocks */
OUTPUT,
/* output rendered html directly */
STORE
}
export default BlockMode
+1 -3
View File
@@ -2,9 +2,7 @@ import { Drop } from '../drop/drop'
import { __assign } from 'tslib'
import { NormalizedFullOptions, defaultOptions, RenderOptions } from '../liquid-options'
import { Scope } from './scope'
import { isArray, isNil, isString, isFunction, toLiquid } from '../util/underscore'
import { InternalUndefinedVariableError } from '../util/error'
import { toValueSync } from '../util/async'
import { isArray, isNil, isString, isFunction, toLiquid, InternalUndefinedVariableError, toValueSync } from '../util'
type PropertyKey = string | number;
+3
View File
@@ -0,0 +1,3 @@
export * from './context'
export * from './scope'
export * from './block-mode'
+2 -3
View File
@@ -1,8 +1,7 @@
import { Drop } from '../drop/drop'
export interface PlainObject {
[key: string]: any;
interface ScopeObject extends Record<string, any> {
toLiquid?: () => any;
}
export type Scope = PlainObject | Drop
export type Scope = ScopeObject | Drop