Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 1.65 KB

File metadata and controls

15 lines (9 loc) · 1.65 KB

Flip Arguments medium #arguments

by jiangshan @jiangshanmeta

Take the Challenge

Implement the type version of lodash's _.flip.

Type FlipArguments<T> requires function type T and returns a new function type which has the same return type of T but reversed parameters.

For example:

type Flipped = FlipArguments<(arg0: string, arg1: number, arg2: boolean) => void> 
// (arg0: boolean, arg1: number, arg2: string) => void

Back Share your Solutions Check out Solutions

Related Challenges

3192・Reverse