Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
JSDoc - How to document a parameter that is being ignored `function f(_, otherParam) {}`

I have the following code:

const renderRightActions = (_, dragX) => {
  const trans = dragX.interpolate({
    inputRange: [0, 50, 100, 101],
    outputRange: [60, 110, 110, 110],
  });

  return (
    <Animated.View style={{ transform: [{ translateX: trans }] }}>
      <RectButton
        onPress={handleOnDeleteButtonPress}
        style={[
          styles.trashIconContainer,
          {
            backgroundColor: colors.primary,
          },
        ]}
      >
        <Icon
          name="trash-can"
          type="material-community"
          size={26}
          color={colors.white}
        />
      </RectButton>
    </Animated.View>
  );
};

As you can see, I am ignoring the first argument of the method using the underscore character.

How can I document it in JSDoc? I have tried this:

/**
 * Renders the right actions for the `Swipeable`.
 *
 * @param {any} _ - Ignored parameter.
 * @param {Animated.AnimatedInterpolation} dragX - Drag X value.
 * @returns {React.ReactNode} The `Swipeable` right action.
 */

But not sure if there is any standardized way to handle this situation. Any ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!