Skip to content

Commit bb1feb7

Browse files
Added public typealiases for the Datastore types on the format
1 parent a851d79 commit bb1feb7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/CodableDatastore/Datastore/DatastoreFormat.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ extension DatastoreFormat {
176176
}
177177
}
178178

179+
extension DatastoreFormat {
180+
/// A typealias of the read-write datastore this format describes.
181+
public typealias Datastore = CodableDatastore.Datastore<Self, ReadWrite>
182+
183+
/// A typealias of the read-only datastore this format describes.
184+
public typealias ReadOnlyDatastore = CodableDatastore.Datastore<Self, ReadOnly>
185+
}
186+
179187
//extension DatastoreFormat where Instance: Identifiable, Instance.ID: Indexable & DiscreteIndexable, Self.Identifier == Instance.ID {
180188
// @available(*, unavailable, message: "id is reserved on Identifiable Instance types.")
181189
// var id: Never { preconditionFailure("id is reserved on Identifiable Instance types.") }

0 commit comments

Comments
 (0)