interval / interval-node

The official Interval SDK for Node.
https://interval.com/docs
121 stars 13 forks source link

Optional typed router #9

Open homoky opened 2 years ago

homoky commented 2 years ago

I have idea how to implement the typed router. We could pass the type with list of available actions with defined required arguments for each action which can be used from linking from the table or redirecting:

type Actions = {
 composers_list: undefined, // no arguments
 composers_update: { id: string }
}

The type would force us to: