21 lines
401 B
Swift
21 lines
401 B
Swift
|
//
|
||
|
// PreferenceKey.swift
|
||
|
// TuskerPreferences
|
||
|
//
|
||
|
// Created by Shadowfacts on 4/12/24.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
public protocol PreferenceKey {
|
||
|
associatedtype Value: Codable
|
||
|
|
||
|
static var defaultValue: Value { get }
|
||
|
|
||
|
static func didSet(in store: PreferenceStore, newValue: Value)
|
||
|
}
|
||
|
|
||
|
extension PreferenceKey {
|
||
|
static func didSet(in store: PreferenceStore, newValue: Value) {}
|
||
|
}
|