turbo-sync/index.d.ts
2024-12-25 20:38:57 +01:00

52 lines
1.1 KiB
TypeScript

// @ts-check
export type TurboSyncConfigArray = TurboSyncConfigObject[];
export interface TurboSyncConfigObject {
title?: string;
files?: string[] | TurboSyncFileObject[];
folders?: string[] | TurboSyncFileObject[];
options?: TurboSyncOptions;
}
export interface TurboSyncFileObject {
path: string;
host?: string;
user?: string;
ssh_key?: string;
interval?: number;
}
export interface TurboSyncOptions {
delete?: boolean;
exclude?: string[];
interval?: number;
}
export interface SyncFilesFnParams {
files: string[] | TurboSyncFileObject[];
options: TurboSyncOptions | undefined;
}
export interface SyncFilesSyncFnParams {
files: string[] | TurboSyncFileObject[];
options: TurboSyncOptions | undefined;
filePath: string;
}
export interface SyncFoldersFnParams {
folders: string[] | TurboSyncFileObject[];
options: TurboSyncOptions | undefined;
}
export interface SyncFoldersSyncFnParams {
dirs: string[] | TurboSyncFileObject[];
options: TurboSyncOptions | undefined;
dirPath: string;
init?: boolean;
}
export interface HandleEnvVarsFnParams {
json: string;
}