Skip to content

Commit 9454327

Browse files
authored
Merge Fix StringQuantum get values #17
2 parents 815f639 + 940896a commit 9454327

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sources/Typesense/Shared/Coders.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ public let decoder = JSONDecoder()
55

66
public enum StringQuantum: Codable {
77

8+
public var arrStr : [String]? {
9+
guard case .arrOfStrings(let arrOfStrings) = self else { return nil }
10+
return arrOfStrings
11+
}
12+
13+
public var arrArrStr : [[String]]? {
14+
guard case .arrOfArrOfStrings(let arrOfArrOfStrings) = self else { return nil }
15+
return arrOfArrOfStrings
16+
}
17+
818
case arrOfStrings([String]), arrOfArrOfStrings([[String]])
919

1020
public init(from decoder: Decoder) throws {

0 commit comments

Comments
 (0)