@sunzhongmou/math
Version:
Mathematical knowledge context
21 lines (20 loc) • 587 B
TypeScript
import * as DDD from '@sunzhongmou/ddd';
export declare enum Operations {
ADD = 0,
SUB = 1
}
interface OperationSet {
operand: number;
operation: Operations;
}
export declare class Expression implements DDD.ValueObject {
destinationOperand: number;
operationSets: OperationSet[];
constructor(destOperand: number, operation: Operations, operand: number);
addOperationSet(operation: Operations, operand: number): void;
sameValueAs(other: Expression): boolean;
getOperationSetsRaw(): string;
getRaw(): string;
execute(): number;
}
export {};