Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5dd7ed687a0c210006a6820f

Refactor typescript arrow function type

Make arrow function type less verbose and easier to read

Start file
export const playground: (
  object?: Partial<PlaygroundSection>,
) => PlaygroundSection = config =>
  baseSection({
    type: SectionType.Playground,
    ...config,
  });
End file
export const playground = (
  config?: Partial<PlaygroundSection>,
): PlaygroundSection =>
  baseSection({
    type: SectionType.Playground,
    ...config,
  });

View Diff

1,3c1,3
< export const playground: (
<   object?: Partial<PlaygroundSection>,
< ) => PlaygroundSection = config =>
---
> export const playground = (
>   config?: Partial<PlaygroundSection>,
> ): PlaygroundSection =>

Solutions by @russellzhaomao:

Unlock 9 remaining solutions by signing in and submitting your own entry
Created by: @argshook

71 active golfers, 323 entries

Solutions by @russellzhaomao:
20
#24 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:43AM

21
#>31 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:41AM

22
#>39 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:39AM

23
#>42 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:38AM

25
#>43 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:37AM

26
#>46 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:36AM

27
#>49 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:35AM

28
#>53 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:33AM

31
#>61 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:31AM