Skip to content

Commit

Permalink
Added public typealiases for the Datastore types on the format
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitribouniol committed Apr 12, 2024
1 parent a851d79 commit bb1feb7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/CodableDatastore/Datastore/DatastoreFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ extension DatastoreFormat {
}
}

extension DatastoreFormat {
/// A typealias of the read-write datastore this format describes.
public typealias Datastore = CodableDatastore.Datastore<Self, ReadWrite>

/// A typealias of the read-only datastore this format describes.
public typealias ReadOnlyDatastore = CodableDatastore.Datastore<Self, ReadOnly>
}

//extension DatastoreFormat where Instance: Identifiable, Instance.ID: Indexable & DiscreteIndexable, Self.Identifier == Instance.ID {
// @available(*, unavailable, message: "id is reserved on Identifiable Instance types.")
// var id: Never { preconditionFailure("id is reserved on Identifiable Instance types.") }
Expand Down

0 comments on commit bb1feb7

Please sign in to comment.