UNPKG

1.13 kBTypeScriptView Raw
1/// <reference types="node" />
2import { CpuInfo } from 'os';
3import { SpawnSyncOptions } from 'child_process';
4export declare type NodeCallback = (err?: Error, data?: any) => void;
5export declare type NodeAnyCallback = (...args: any[]) => void;
6export declare type CopyTuple = [string, string];
7export interface IMap<T> {
8 [key: string]: T;
9}
10export interface ICopy {
11 src: string;
12 dest: string;
13}
14export declare type NpmCommand = (...args: any[]) => any;
15export interface ICpu extends CpuInfo {
16 cores?: number;
17}
18export interface IExecMethods {
19 command(cmd: string, args: string | string[], options?: boolean | SpawnSyncOptions): any;
20 node(args: string | string[], options?: boolean | SpawnSyncOptions): any;
21 npm(args: string | string[], options?: boolean | SpawnSyncOptions): any;
22 git(args: string | string[], options?: boolean | SpawnSyncOptions): any;
23}
24export interface ILogger {
25 (...args: any[]): void;
26 colors: IMap<string>;
27 colorize: boolean;
28 error(...args: any[]): ILogger;
29 warn(...args: any[]): ILogger;
30 info(...args: any[]): ILogger;
31 exit(code?: any): void;
32}