AsyncAttemptAsyncAttempt Type#// AsyncAttempt<S,F>type AsyncAttempt<S = any, F = any> = Promise<Attempt<S,F>> // Usual format of an AsyncAttempt functionconst AttemptFunction = (...params): AsyncAttempt<S, F> => { const s: S const f: F const result: boolean if (result) return Success(s) else return Failure(f)}CopyDefines the return type on an AsyncAttempt function.AsyncAttempt Function#// AsyncAttempt()const AsyncAttempt = async (operation: AsyncAttempt<S,F>): Promise<S> // A generic asyncattempt functionconst AsyncAttemptFunction = async (): AsyncAttempt<S,F> // Returns S or throws Fconst result = await AsyncAttempt(AsyncAttemptFunction())CopyUnwraps the return value of an AsyncAttempt function, returning a value of type S or throwing a value of type F.