Skip to content

[@types/qunit] fix optional callback for test.todo and test.skip#71036

Merged
typescript-bot merged 2 commits into
DefinitelyTyped:masterfrom
vstefanovic97:master
Oct 31, 2024
Merged

[@types/qunit] fix optional callback for test.todo and test.skip#71036
typescript-bot merged 2 commits into
DefinitelyTyped:masterfrom
vstefanovic97:master

Conversation

@vstefanovic97
Copy link
Copy Markdown
Contributor

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • [+] Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • [+] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

This is a follow up of #70977

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Oct 30, 2024

@vstefanovic97 Thank you for submitting this PR!

This is a live comment that 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

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 71036,
  "author": "vstefanovic97",
  "headCommitOid": "313db55072122a9cc0efa2b0aa1fc847a1dab782",
  "mergeBaseOid": "db87a9fc420a5781e8b310544bb587f1384af48c",
  "lastPushDate": "2024-10-30T08:41:49.000Z",
  "lastActivityDate": "2024-10-31T00:21:41.000Z",
  "mergeOfferDate": "2024-10-30T18:11:00.000Z",
  "mergeRequestDate": "2024-10-31T00:21:41.000Z",
  "mergeRequestUser": "Krinkle",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "qunit",
      "kind": "edit",
      "files": [
        {
          "path": "types/qunit/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/qunit/test/global-test.ts",
          "kind": "test"
        },
        {
          "path": "types/qunit/test/module-test.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "waratuman",
        "sechel",
        "gitKrystan",
        "jamescdavis",
        "wagenet",
        "Krinkle"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "Krinkle",
      "date": "2024-10-30T18:10:22.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 2446199099,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Oct 30, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @waratuman @sechel @gitKrystan @jamescdavis @wagenet @Krinkle — 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.

Comment thread types/qunit/index.d.ts
callback: (assert: Assert, data: T) => void,
) => void;

interface EachFunction {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this is obvious, but can you explain the choice between interface vs type here? Is this needed for the below? Or does it ease ember-qunit? Or something else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krinkle it's so that in ember-qunit we can just add a new callable signature by extending the interface

namespace QUnit {
  interface EachFunction {
     <TC extends TestContext, T>(
        name: string,
        dataset: T[]
        callback: (this: TC, assert: Assert, data: T) => void | Promise<unknown>
      ): void;
  }
}

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Oct 30, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

@vstefanovic97: Everything looks good here. I am ready to merge this PR (at 313db55) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@waratuman, @sechel, @gitKrystan, @jamescdavis, @wagenet, @Krinkle: you can do this too.)

@Krinkle
Copy link
Copy Markdown
Contributor

Krinkle commented Oct 31, 2024

Ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants