 
 import FirebaseStorage
 
-/// getResultCallback generates a closure that returns a Result type from a closure that returns an
-/// optional type and Error.
+/// Generates a closure that returns a `Result` type from a closure that returns an optional type
+/// and `Error`.
+///
+/// - Parameters:
+///   - completion: A completion block returning a `Result` enum with either a generic object or
+///                 an `Error`.
+/// - Returns: A closure parameterized with an optional generic and optional `Error` to match
+///            Objective C APIs.
 private func getResultCallback<T>(
   completion: @escaping (Result<T, Error>) -> Void
 ) -> (_: T?, _: Error?) -> Void {

         completion: getResultCallback(completion: completion))
  }

  func list(withMaxResults maxResults: Int64,
            completion: @escaping (Result<StorageListResult, Error>) -> Void) {
    list(withMaxResults: maxResults,
         completion: getResultCallback(completion: completion))
  }

  func listAll(completion: @escaping (Result<StorageListResult, Error>) -> Void) {
    listAll(completion: getResultCallback(completion: completion))
  }

  func putData(_ uploadData: Data,
               metadata: StorageMetadata? = nil,
               completion: @escaping (Result<StorageMetadata, Error>) -> Void)

                   completion: getResultCallback(completion: completion))
  }

  /// Asynchronously uploads a file to the currently specified `StorageReference`.
  ///
  /// - Parameters:
  ///   - from A URL representing the system file path of the object to be uploaded.
  ///   - metadata `StorageMetadata` containing additional information (MIME type, etc.)
  ///              about the object being uploaded.
  ///   - completion A completion block that returns a `Result` enum with either the
  ///                object metadata or an `Error`.
  ///
  /// - Returns: An instance of `StorageUploadTask`, which can be used to monitor or manage
  ///            the upload.
  func putFile(from: URL,
               metadata: StorageMetadata? = nil,
               completion: @escaping (Result<StorageMetadata, Error>) -> Void)
