DefinitelyTyped icon indicating copy to clipboard operation
DefinitelyTyped copied to clipboard

debounce-promise: When options.accumulate is true, returned function has an altered call signature

Open tprobinson opened this issue 3 years ago • 4 comments

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • [x] Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/bjoerge/debounce-promise#with-accumulatetrue
  • [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

When debounce is called with { accumulate: true }, the passed-in function will be called with a single parameter: an array of all calls, where each member is an array of all parameters it was called with, during its defer period. The new type definitions here reflect this asymmetric call signature compared to the default mode.

The passed-in function then should have a signature like (arg: Array<[string, number]>), even if it only takes one parameter to begin with, as something like string[][] seems to confuse TypeScript into thinking the returned function can take any number of string parameters.

tprobinson avatar Aug 14 '22 05:08 tprobinson

@tprobinson Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by type definition owners or DT maintainers

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.

Inactive

This PR has been inactive for 11 days — please try to get reviewers!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 61723,
  "author": "tprobinson",
  "headCommitOid": "537acf430fe14bd7dd1929bb102f9fdc4d23a1c1",
  "mergeBaseOid": "86cb20c7f234f847a17d7d9fe8314604b49c01ba",
  "lastPushDate": "2022-12-01T23:44:55.000Z",
  "lastActivityDate": "2022-12-01T23:51:23.000Z",
  "mergeRequestDate": "2022-12-01T23:51:23.000Z",
  "mergeRequestUser": "tprobinson",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "debounce-promise",
      "kind": "edit",
      "files": [
        {
          "path": "types/debounce-promise/debounce-promise-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/debounce-promise/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "whtsky"
      ],
      "addedOwners": [
        "tprobinson"
      ],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "stale",
      "reviewer": "sandersn",
      "date": "2022-12-01T22:40:24.000Z",
      "abbrOid": "2213dc2"
    }
  ],
  "mainBotCommentID": 1214291471,
  "ciResult": "pass"
}

typescript-bot avatar Aug 14 '22 05:08 typescript-bot

🔔 @whtsky — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

typescript-bot avatar Aug 14 '22 05:08 typescript-bot

It has been more than two weeks and this PR still has no reviews.

I'll bump it to the DT maintainer queue. Thank you for your patience, @tprobinson.

(Ping @whtsky.)

typescript-bot avatar Sep 11 '22 13:09 typescript-bot

@tprobinson One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

typescript-bot avatar Sep 12 '22 22:09 typescript-bot

@sandersn Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

typescript-bot avatar Nov 24 '22 00:11 typescript-bot

@sandersn Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

typescript-bot avatar Dec 01 '22 23:12 typescript-bot

Ready to merge

tprobinson avatar Dec 01 '22 23:12 tprobinson

:passport_control: Hi @tprobinson,

I can't accept a pull request until all of the checks in the "Status" section of this comment are green. I will let you know once that happens.

Thanks, and happy typing!

typescript-bot avatar Dec 01 '22 23:12 typescript-bot

Re-ping @whtsky:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

typescript-bot avatar Dec 13 '22 02:12 typescript-bot