UNPKG

penguins-eggs

Version:

A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others

43 lines (41 loc) 1.11 kB
/** * ./src/lib/utils.ts * penguins-eggs v.10.0.0 / ecmascript 2020 * author: Piero Proietti * email: piero.proietti@gmail.com * license: MIT */ import { IExec } from '../interfaces/index.js'; /** * * @param command * @param param1 * @returns */ export declare function exec(command: string, { capture, echo, ignore }?: { capture?: boolean | undefined; echo?: boolean | undefined; ignore?: boolean | undefined; }): Promise<IExec>; /** * Compare two instances in order to determinate if they have save property values * * @param instance1 T * @param instance2 T * @returns boolean */ export declare function compareInstances<T>(instance1: T, instance2: T): boolean; /** * Il problema è in questa funzione: core/cli-ux/indesx.ts * qui riportata solo come esempio * function timeout(p: Promise<any>, ms: number) { function wait(ms: number, unref = false) { return new Promise(resolve => { const t: any = setTimeout(() => resolve(null), ms) if (unref) t.unref() }) } return Promise.race([p, wait(ms, true).then(() => ux.error('timed out'))]) } */