Skip to content

Conversation

@voxpelli
Copy link
Contributor

This commit fixes the following error, which appears when running TS ^4.8.0-dev.20220707 with eg. npx tsc --lib es2020,es2022.error,es2021.promise or npx tsc --lib esnext

error TS2425: Class 'Error' defines instance member property 'cause', but extended class 'VError' defines it as instance member function.

Discovered in voxpelli/pony-cause#41 when looking to extend the tests for voxpelli/pony-cause#35 to detect whether the nightly of 4.8.0 now correctly fixes that, following the merge of microsoft/TypeScript#49639


Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 12, 2022

@voxpelli Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this PR edits the configuration file, it can be merged once it's reviewed by a DT maintainer.

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ A DT maintainer needs to approve changes which affect module config files

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": 61199,
  "author": "voxpelli",
  "headCommitOid": "5d2c36c65a874d35576740c0f02931b33736ecab",
  "mergeBaseOid": "e72ad742bdc332ce49ecac24b81a2c9636835e98",
  "lastPushDate": "2022-07-12T13:28:16.000Z",
  "lastActivityDate": "2022-07-20T01:52:27.000Z",
  "mergeOfferDate": "2022-07-19T23:43:06.000Z",
  "mergeRequestDate": "2022-07-20T01:52:27.000Z",
  "mergeRequestUser": "voxpelli",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "verror",
      "kind": "edit",
      "files": [
        {
          "path": "types/verror/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/verror/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it (check: `compilerOptions.lib.1`, `compilerOptions.lib.2`)"
        }
      ],
      "owners": [
        "svi3c",
        "max4t"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "RyanCavanaugh",
      "date": "2022-07-19T23:42:23.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 1181728145,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Untested Change This PR does not touch tests Check Config Changes a module config files labels Jul 12, 2022
@typescript-bot
Copy link
Contributor

Hey @voxpelli,

😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.

This can potentially save days of time for you!

@typescript-bot
Copy link
Contributor

🔔 @svi3c @max4t — 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.

This commit fixes the following error, which appears when running TS `^4.8.0-dev.20220707` with eg. ` npx tsc --lib es2020,es2022.error,es2021.promise` or ` npx tsc --lib esnext`

> error TS2425: Class 'Error' defines instance member property 'cause', but extended class 'VError' defines it as instance member function.

Discovered in voxpelli/pony-cause#41 when looking to extend the tests for voxpelli/pony-cause#35 to detect whether the nightly of `4.8.0` now correctly fixes that, following the merge of microsoft/TypeScript#49639
@voxpelli
Copy link
Contributor Author

I'm not sure what to do about this Config files to check:

verror/tsconfig.json: not the expected form and not moving towards it (check: compilerOptions.lib.1, compilerOptions.lib.2)

The es2022.error is what this definition needs to be compatible with. The es2021.promise is a dependency of es2022.error.

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jul 19, 2022
@typescript-bot
Copy link
Contributor

@voxpelli: Everything looks good here. I am ready to merge this PR (at 5d2c36c) 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! ❤️

(@svi3c, @max4t: you can do this too.)

@voxpelli
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 93ea81e into DefinitelyTyped:master Jul 20, 2022
@voxpelli voxpelli deleted the patch-1 branch July 20, 2022 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Check Config Changes a module config files Maintainer Approved 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 Untested Change This PR does not touch tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants