@porosys/ndtool
Version:
Netdata alert and automation tool
17 lines (13 loc) • 383 B
text/typescript
type DependencyBase = {
binary: string;
packageName?: string;
};
type DependencyCustom = DependencyBase & {
custom: true;
install: () => Promise<void>;
uninstall: () => Promise<void>;
};
export type Dependency = DependencyBase | DependencyCustom;
export const isDependencyCustom = (
dependency: Dependency,
): dependency is DependencyCustom => 'custom' in dependency;