Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How to type curried functions

Open
#10 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by reviewing the invocation examples and the proposed TypeScript overloads for curry and divide. Determine whether the omitted zero-argument and placeholder-only forms should remain untyped, and verify the decision against the repository's existing declarations and type-checking workflow.

Written by the indexing model from the issue text.

Description

ramda's curry function is awesome but also has abilities that are not strictly necessary to type

// all of these work!
R.divide(10, 2); // 5
R.divide()(10, 2); // 5
R.divide(R.__)(10, 2); // 5

The use cases for both R.divide() and R.divide(R.__) are however negligible

So when typing out, we're only going to type it as:

export function divide(a: number, b: number): number;
export function divide(__: Placeholder, b: number): (a: number) => number;
export function divide(a: number): (b: number) => number;

And leave out

export function divide(): (a: number, b: number) => number;
export function divide(__: Placeholder): (a: number, b: number) => number;
Dominant language
TypeScript
Stars
31
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ramda/types

All issues in ramda/types

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.