ngx-diagrams
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
41 lines (40 loc) • 1.46 kB
TypeScript
/**
* Utility pathing and routing service
*/
import { Observable } from 'rxjs';
import { Coords } from '../interfaces/coords.interface';
export declare enum LOG_LEVEL {
'LOG' = 0,
'ERROR' = 1
}
export declare let __DEV__: boolean;
export declare let __LOG__: LOG_LEVEL;
export declare function enableDiagramProdMode(): void;
export declare function setLogLevel(level: LOG_LEVEL): void;
export declare function isDev(): boolean;
export declare function log(message: string, level?: LOG_LEVEL, ...args: any[]): void;
/**
* rxjs log operator
* @internal
*/
export declare function withLog(message: string, level?: LOG_LEVEL, ...args: any): <T>(source: Observable<T>) => Observable<T>;
export declare type ID = string;
/**
* Generates a unique ID
*/
export declare function UID(): ID;
export declare function isArray<T>(val: any): val is T[];
export declare function isString(val: any): val is string;
export declare function isFunction(val: any): val is (...args: any) => any;
export declare function isNil(v: any): boolean;
export declare function coerceArray<T>(value: T | T[]): T[];
export declare function mapToArray<T>(map: {
[key: string]: T;
}): T[];
export declare function arrayToMap<T>(arr: Array<{
id: ID;
} & T>): {
[key: string]: T;
};
export declare function generateLinePath(firstPoint: any, lastPoint: any): string;
export declare function generateCurvePath(firstPoint: Coords, lastPoint: Coords, curvy?: number): string;