Skip to content

Commit 9f1bf4a

Browse files
committed
Add typeDescription to Map.
1 parent 1042554 commit 9f1bf4a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Sources/GraphQL/Map/Map.swift

+21
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,27 @@ extension Map {
204204
}
205205
}
206206

207+
// MARK: is<Type>
208+
209+
extension Map {
210+
public var typeDescription: String {
211+
switch self {
212+
case .null:
213+
return "null"
214+
case .bool:
215+
return "bool"
216+
case .number:
217+
return "number"
218+
case .string:
219+
return "string"
220+
case .array:
221+
return "array"
222+
case .dictionary:
223+
return "dictionary"
224+
}
225+
}
226+
}
227+
207228
// MARK: as<type>?
208229

209230
extension Map {

0 commit comments

Comments
 (0)