Skip to content

Instantly share code, notes, and snippets.

@vikingosegundo
Created September 10, 2022 15:07
Show Gist options
  • Save vikingosegundo/0e1e85a34e82316ef2e75d8c75e23bc7 to your computer and use it in GitHub Desktop.
Save vikingosegundo/0e1e85a34e82316ef2e75d8c75e23bc7 to your computer and use it in GitHub Desktop.
typealias Access<S> = ( ) -> S
typealias Change<C> = ( C... ) -> ()
typealias Reset = ( ) -> ()
typealias Callback = ( @escaping () -> () ) -> ()
typealias Destroy = ( ) -> ()
typealias Store<S,C> = (
state: Access<S>,
change: Change<C>,
reset: Reset,
updated: Callback,
destroy: Destroy
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment