sardines-core
Version:
Core of sardines.js
34 lines • 1.74 kB
TypeScript
import { Sardines } from './interfaces/sardines';
export interface UnifiedErrorMessage {
error: any;
type: string;
subType: string;
[key: string]: any;
}
export declare const unifyErrMesg: (err: any, type?: string, subType?: string) => UnifiedErrorMessage;
export declare const unifyAsyncHandler: (type: string, subType: string, handler: any, thisObj?: any, msg?: string) => (...params: any[]) => Promise<any>;
export declare const debugLog: (msg: string, ...param: any[]) => void;
export declare const mergeObjects: (target: any, source: any) => any;
export declare const isEqual: (A: any, B: any, isReverse?: boolean) => boolean;
interface ChainedFunction {
(fnParam: any, next: ChainedFunction | undefined): any;
}
export declare const chainFunctions: (functionArray: ChainedFunction[], fnParam: any) => ((next?: ChainedFunction | undefined) => Promise<void>) | null;
export declare const inspect: (obj: any) => string;
export declare const colorfulInspect: (obj: any) => string;
export declare const inspectedLog: (obj: any) => void;
export declare const inspectedDebugLog: (errMsg: string, obj: any) => void;
export declare const logo = "sardines";
export declare const parseArgs: () => {
params: {
[key: string]: any;
};
files: string[];
};
export declare const genServiceIdentitySting: (serviceIdentity: Sardines.ServiceIdentity) => string;
export declare const parseServiceIdentity: (identityString: string) => Sardines.ServiceIdentity | null;
export declare const sleep: (milliseconds: number) => Promise<unknown>;
export declare const getKey: (obj: any) => string;
export declare const getDefaultClassFromPackage: (packClass: any) => any;
export {};
//# sourceMappingURL=utils.d.ts.map