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 @RomanPrivalov:
Unlock 5 remaining solutions by signing in and submitting your own entry