You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GEOSwift defines a GeometryConvertible protocol that makes it possible to initialize a Feature without redundantly specifying both the Geometry case and the geometric type’s initializer at the same time. Turf’s GeoJSONObject and Geometry enumerations should have something similar. For example:
A similar JSONValueConvertible protocol might eliminate a major backwards-incompatible change that arose in #154, making both syntaxes equivalent again:
A similar JSONValueConvertible protocol might eliminate a major backwards-incompatible change that arose in #154, making both syntaxes equivalent again
I’ve been trying various gymnastics but haven’t managed to make this work without making [String: Any?] conform to ExpressibleByArrayLiteral, which would be overbroad.
A similar JSONValueConvertible protocol might eliminate a major backwards-incompatible change that arose in #154, making both syntaxes equivalent again
GEOSwift defines a GeometryConvertible protocol that makes it possible to initialize a Feature without redundantly specifying both the Geometry case and the geometric type’s initializer at the same time. Turf’s GeoJSONObject and Geometry enumerations should have something similar. For example:
would become simply:
It’s similar to the initializers and literals that #154 added to JSONValue, but this protocol distributes the implementation across each type:
turf-swift/Sources/Turf/JSON.swift
Lines 49 to 52 in 007896b
/cc @macdrevx
The text was updated successfully, but these errors were encountered: