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 @Jianfen22425058:

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

71 active golfers, 323 entries

Solutions by @Jianfen22425058:
20
#20 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:30AM

21
#>31 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:29AM

22
#>39 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:28AM

23
#>42 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:23AM

24
#>42 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:21AM

25
#>43 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:19AM

25
#>43 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:22AM

26
#>46 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:19AM

27
#>49 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:18AM

29
#>58 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:15AM

36
#>67 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:14AM