mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
add file chuck upload, file validation, redirect to home page incase route doesnt exist and refresh token interceptor
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
|
||||
export type Either<T, E> = { isOk: true; isError: false, value: T } | { isOk: false; isError: true, error: E };
|
||||
|
||||
export function ok<T, E>(value: T): Either<T, E> {
|
||||
return { isOk: true, isError: false, value };
|
||||
}
|
||||
|
||||
export function error<T, E>(error: E): Either<T, E> {
|
||||
return { isOk: false, isError: true, error};
|
||||
}
|
||||
Reference in New Issue
Block a user