I'm trying to get the user sign in and I'm getting the following error:
Generic parameter 'T' could not be inferred
This is the code:
// Gets User signed-in
func getUser() async throws -> AuthUser {
do {
try await withUnsafeThrowingContinuation { continuation in
if let user = Amplify.Auth.getCurrentUser() {
continuation.resume(returning: user )
}
}
} catch(let error) {
print(error)
}
}
Why is that?