Skip to content

Commit

Permalink
Merge Fix StringQuantum get values #17
Browse files Browse the repository at this point in the history
  • Loading branch information
programVeins authored Mar 27, 2022
2 parents 815f639 + 940896a commit 9454327
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/Typesense/Shared/Coders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ public let decoder = JSONDecoder()

public enum StringQuantum: Codable {

public var arrStr : [String]? {
guard case .arrOfStrings(let arrOfStrings) = self else { return nil }
return arrOfStrings
}

public var arrArrStr : [[String]]? {
guard case .arrOfArrOfStrings(let arrOfArrOfStrings) = self else { return nil }
return arrOfArrOfStrings
}

case arrOfStrings([String]), arrOfArrOfStrings([[String]])

public init(from decoder: Decoder) throws {
Expand Down

0 comments on commit 9454327

Please sign in to comment.