mirror of https://github.com/artf/grapesjs.git
3 changed files with 20 additions and 3 deletions
@ -0,0 +1,14 @@ |
|||||
|
import EditorModel from '../../../../editor/model/Editor'; |
||||
|
import { Operation } from './types'; |
||||
|
|
||||
|
export abstract class Operator<OperationType extends Operation> { |
||||
|
protected em: EditorModel; |
||||
|
protected operation: OperationType; |
||||
|
|
||||
|
constructor(operation: any, opts: { em: EditorModel }) { |
||||
|
this.operation = operation; |
||||
|
this.em = opts.em; |
||||
|
} |
||||
|
|
||||
|
abstract evaluate(left: any, right: any): boolean; |
||||
|
} |
||||
@ -1,3 +0,0 @@ |
|||||
export abstract class Operator { |
|
||||
abstract evaluate(left: any, right: any): boolean; |
|
||||
} |
|
||||
@ -0,0 +1,6 @@ |
|||||
|
import { AnyTypeOperation } from "./AnyTypeOperator"; |
||||
|
import { BooleanOperation } from "./BooleanOperator"; |
||||
|
import { NumberOperation } from "./NumberOperator"; |
||||
|
import { StringOperation } from "./StringOperator"; |
||||
|
|
||||
|
export type Operation = AnyTypeOperation | StringOperation | NumberOperation | BooleanOperation; |
||||
Loading…
Reference in new issue