simplify-angular
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.0.
42 lines (41 loc) • 1.43 kB
TypeScript
import { SimpleLogger } from "./simple-logger";
export interface SimpleResultValueParams {
logException?: boolean;
logger?: SimpleLogger;
message?: string;
stackTrace?: Error;
value?: any;
}
export declare class SimpleResult {
static readonly codeNothingExecuted = 0;
static readonly codeSuccess = 1;
static readonly codeFailure = -1;
static readonly codeException = -2;
static readonly keyCode = "code";
static readonly keyMessage = "message";
static readonly keyOtherDetails = "other_details";
static readonly keyStatus = "status";
static readonly keyValue = "value";
exception: any;
stackTrace?: Error;
logger?: SimpleLogger;
code: number;
message: any;
status: string;
value: any;
otherDetails: Record<string, any>;
log: any[];
static fromJson(mapData: Record<string, any>): SimpleResult;
get isException(): boolean;
get isFailure(): boolean;
get isSuccess(): boolean;
appendResultLog(result: SimpleResult): void;
prependResultLog(result: SimpleResult): void;
setFromResult(result: SimpleResult): void;
setSuccess(params?: SimpleResultValueParams): void;
setFailure(params?: SimpleResultValueParams): void;
setException(exception: any, params?: SimpleResultValueParams): void;
setValuesFromMap(mapData: Record<string, any>): void;
toJson(): Record<string, any>;
toString(): string;
}