UNPKG

@nestjs-cqrs-eventsourcing/core

Version:

Event sourcing for nestjs CQRS

14 lines (13 loc) 1.03 kB
import { AnyObject, Nullable } from '@nestjs-cqrs-eventsourcing/core'; export declare const isValidDate: (d: Date) => boolean; export declare const nowIso: () => string; export declare const nowIsoGmt: () => string; export declare const logSection: (section: string, ...message: unknown[]) => void; export declare const errSection: (section: string, ...message: unknown[]) => void; export declare const getUpdateDiff: <T extends AnyObject, K extends keyof T = keyof T>(oldObj: T, newObj: T, nullableFields?: K[]) => Partial<Nullable<T>> | false; export declare const generateRandomNonce: (length: number, characters?: string) => string; export declare const randomNonce: (length: number) => string; export declare const getRandomNonce: (length: number) => string; export declare const sleep: (ms: number) => Promise<void>; export declare const dedupe: <T>(a: T[]) => T[]; export declare function logSection1(level: number, section: string, action: 'request' | 'acquire' | 'release' | 'non-lock', ...rest: (string | number)[]): void;