Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function createActions<K extends keyof Actions<any>, E>(
- endpoint: string,
- url: string,
- actions: K[],
- ): Pick<Actions<E>, K> {
- return {
- item: actions.includes('item') && (
- path: `${url}/:id`,
- endpoint: {
- endpoint: `${endpoint}:id/`,
- method: 'GET',
- },
- )
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement