Skip to content

Instantly share code, notes, and snippets.

@shulcsm
Created September 5, 2019 06:40
Show Gist options
  • Save shulcsm/849ce74d0350fc7997231dc1ed74e592 to your computer and use it in GitHub Desktop.
Save shulcsm/849ce74d0350fc7997231dc1ed74e592 to your computer and use it in GitHub Desktop.
interface Actions<E> {
list: ListAction;
add: AddAction<E>;
item: ItemAction;
}
type ActionType<E> = keyof Actions<E>;
function createActions<E extends Entity>(
actions: ActionType<E>[] = ['list', 'add', 'item'],
): Partial<Actions<E>> {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment