Progress work
All checks were successful
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2025-10-27 21:21:23 +01:00
parent f69125012e
commit 1c0519cfaf

View File

@@ -95,6 +95,11 @@ const ResultPrototype = Object.freeze({
} as const satisfies Result.Prototype) } as const satisfies Result.Prototype)
export interface ProgressService<P = never> {
readonly update: (progress: P) => Effect.Effect<void>
}
export const isResult = (u: unknown): u is Result<unknown, unknown, unknown> => Predicate.hasProperty(u, ResultTypeId) export const isResult = (u: unknown): u is Result<unknown, unknown, unknown> => Predicate.hasProperty(u, ResultTypeId)
export const isInitial = (u: unknown): u is Initial => isResult(u) && u._tag === "Initial" export const isInitial = (u: unknown): u is Initial => isResult(u) && u._tag === "Initial"
export const isRunning = (u: unknown): u is Running => isResult(u) && u._tag === "Running" export const isRunning = (u: unknown): u is Running => isResult(u) && u._tag === "Running"