Simplify typescript interface

This commit is contained in:
Mattias Granlund 2023-06-28 15:14:09 +01:00
parent cac92dd027
commit 71f7165833

View File

@ -9,12 +9,12 @@ import { error } from '$lib/toasts';
const cache: Map<string, VirtualBranchOperations & Readable<Loadable<Branch[]>>> = new Map();
export interface VirtualBranchOperations {
setTarget: (branch: string) => Promise<object>;
createBranch: (name: string, path: string) => Promise<void | object>;
commitBranch: (branch: string, message: string) => Promise<void | object>;
updateBranchTarget: () => Promise<void | object>;
updateBranchName: (branchId: string, name: string) => Promise<void | object>;
moveFiles: (branchId: string, paths: Array<string>) => Promise<void | object>;
setTarget(branch: string): Promise<object>;
createBranch(name: string, path: string): Promise<void | object>;
commitBranch(branch: string, message: string): Promise<void | object>;
updateBranchTarget(): Promise<void | object>;
updateBranchName(branchId: string, name: string): Promise<void | object>;
moveFiles(branchId: string, paths: Array<string>): Promise<void | object>;
}
export function getVirtualBranches(