mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Hold errors in GitSyncProvider
This commit is contained in:
5 files changed
+98
-19
No files matched your search
@@ -6,13 +6,16 @@ export interface GitSyncState {
|
||||
dir: string;
|
||||
operation: GitOperation;
|
||||
isActive: boolean;
|
||||
error?: Error;
|
||||
}
|
||||
|
||||
export interface GitSyncContextValue {
|
||||
syncStates: Map<string, GitSyncState>;
|
||||
startOperation: (dir: string, operation: GitOperation) => void;
|
||||
endOperation: (dir: string) => void;
|
||||
endOperation: (dir: string, error?: Error) => void;
|
||||
setError: (dir: string, error: Error | null) => void;
|
||||
getState: (dir: string) => GitSyncState | undefined;
|
||||
getError: (dir: string) => Error | undefined;
|
||||
}
|
||||
|
||||
export const GitSyncContext = createContext<GitSyncContextValue | null>(null);
|
||||
Reference in new issue
Block a user