Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plotly.js] Fix TS2430 error with exactOptionalPropertyTypes #69621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andersk
Copy link
Contributor

@andersk andersk commented May 16, 2024

An automated change #54346 that was intended to fix errors with exactOptionalPropertyTypes actually introduced an error with exactOptionalPropertyTypes here. Fix it.

$ echo 'import "plotly.js"' > test.ts
$ tsc --strict --exactOptionalPropertyTypes test.ts
node_modules/@types/plotly.js/index.d.ts:120:18 - error TS2430: Interface 'PlotRelayoutEvent' incorrectly extends interface 'Partial<Layout>'.
  Types of property '"xaxis.range[0]"' are incompatible.
    Type 'number | undefined' is not assignable to type 'Datum'.
      Type 'undefined' is not assignable to type 'Datum'.

120 export interface PlotRelayoutEvent extends Partial<Layout> {
                     ~~~~~~~~~~~~~~~~~

Found 1 error in node_modules/@types/plotly.js/index.d.ts:120

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.

    $ echo 'import "plotly.js"' > test.ts
    $ tsc --strict --exactOptionalPropertyTypes test.ts
    node_modules/@types/plotly.js/index.d.ts:120:18 - error TS2430: Interface 'PlotRelayoutEvent' incorrectly extends interface 'Partial<Layout>'.
      Types of property '"xaxis.range[0]"' are incompatible.
        Type 'number | undefined' is not assignable to type 'Datum'.
          Type 'undefined' is not assignable to type 'Datum'.

    120 export interface PlotRelayoutEvent extends Partial<Layout> {
                         ~~~~~~~~~~~~~~~~~

    Found 1 error in node_modules/@types/plotly.js/index.d.ts:120

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@typescript-bot
Copy link
Contributor

typescript-bot commented May 16, 2024

@andersk Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged once it's reviewed.

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 17 days — please try to get reviewers!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 69621,
  "author": "andersk",
  "headCommitOid": "b4077201b1bcdfc337ed53d49e7489ad184d2e7c",
  "mergeBaseOid": "1bba57575cd1fc07e67147b89872cffa0684f35b",
  "lastPushDate": "2024-05-16T03:02:27.000Z",
  "lastActivityDate": "2024-05-28T19:46:37.000Z",
  "maintainerBlessed": "Waiting for Code Reviews",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "plotly.js",
      "kind": "edit",
      "files": [
        {
          "path": "types/plotly.js/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "chrisgervang",
        "martinduparc",
        "frederikaalund",
        "taoqf",
        "Dadstart",
        "szechyjs",
        "soorajpudiyadath",
        "jonfreedman",
        "meganrm",
        "milesjos",
        "skippercool",
        "mtadams007",
        "marnett-git",
        "peterblazejewicz",
        "brammitch",
        "blizzardjessica",
        "olegshilov",
        "PabloGracia",
        "jvgogh",
        "jpabdou"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 2113926492,
  "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 labels May 16, 2024
@typescript-bot
Copy link
Contributor

Hey @andersk,

😒 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 typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 16, 2024
@typescript-bot
Copy link
Contributor

🔔 @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @soorajpudiyadath @jonfreedman @meganrm @milesjos @SkipperCool @mtadams007 @marnett-git @peterblazejewicz @brammitch @blizzardjessica @olegshilov @PabloGracia @jvgogh @jpabdou — 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 typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 16, 2024
andersk added a commit to andersk/zulip that referenced this pull request May 16, 2024
Submitted upstream:
DefinitelyTyped/DefinitelyTyped#69621

Signed-off-by: Anders Kaseorg <anders@zulip.com>
timabbott pushed a commit to zulip/zulip that referenced this pull request May 16, 2024
@typescript-bot
Copy link
Contributor

Re-ping @chrisgervang, @martinduparc, @frederikaalund, @taoqf, @Dadstart, @szechyjs, @soorajpudiyadath, @jonfreedman, @meganrm, @milesjos, @SkipperCool, @mtadams007, @marnett-git, @peterblazejewicz, @brammitch, @blizzardjessica, @olegshilov, @PabloGracia, @jvgogh, @jpabdou:

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 typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label May 27, 2024
@sheetalkamat sheetalkamat moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Popular package This PR affects a popular package (as counted by NPM download counts). Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. Untested Change This PR does not touch tests
Projects
New Pull Request Status Board
Waiting for Code Reviews
Development

Successfully merging this pull request may close these issues.

None yet

2 participants