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
+4 -5
View File
@@ -1,11 +1,10 @@
import { isComparable } from '../drop/comparable'
import { Context } from '../context/context'
import { isFunction, toValue } from '../util/underscore'
import { Context } from '../context'
import { isFunction, toValue } from '../util'
import { isTruthy } from '../render/boolean'
export interface Operators {
[key: string]: (lhs: any, rhs: any, ctx: Context) => boolean;
}
export type OperatorHandler = (lhs: any, rhs: any, ctx: Context) => boolean;
export type Operators = Record<string, OperatorHandler>
export const defaultOperators: Operators = {
'==': (l: any, r: any) => {