Skip to content

Make dom-mediacapture-record work on TS 4.4's DOM - #54096

Merged
sandersn merged 1 commit into
masterfrom
make-dom-mediacapture-record-work-on-4.4-dom
Jun 28, 2021
Merged

sandersn merged 1 commit into
masterfrom
make-dom-mediacapture-record-work-on-4.4-dom

Conversation

@sandersn

Copy link
Copy Markdown
Contributor

TS 4.4 changes mediacapture-record types. This PR makes it match those
upcoming types.

Needed after microsoft/TypeScript#44684 is merged.

TS 4.4 changes mediacapture-record types. This PR makes it match those
upcoming types.

Needed after microsoft/TypeScript#44684 is merged.
@typescript-bot

typescript-bot commented Jun 25, 2021 •

Copy link
Copy Markdown
Contributor

@sandersn Thank you for submitting this PR!

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 failed
  • 🕐 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.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 54096,
  "author": "sandersn",
  "headCommitOid": "8c2db45c40a509cb863aef731882fc2a5a7e115b",
  "lastPushDate": "2021-06-25T19:08:24.000Z",
  "lastActivityDate": "2021-06-28T17:57:12.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "dom-mediacapture-record",
      "kind": "edit",
      "files": [
        {
          "path": "types/dom-mediacapture-record/dom-mediacapture-record-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/dom-mediacapture-record/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "elsmr",
        "AppLover69"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 868776388,
  "ciResult": "fail",
  "ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8c2db45c40a509cb863aef731882fc2a5a7e115b/checks?check_suite_id=3088697205"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Jun 25, 2021
@typescript-bot

Copy link
Copy Markdown
Contributor

🔔 @elsmr @AppLover69 — 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 added the The CI failed When GH Actions fails label Jun 25, 2021
@typescript-bot

Copy link
Copy Markdown
Contributor

@sandersn The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@sandersn sandersn closed this Jun 28, 2021
@sandersn sandersn reopened this Jun 28, 2021
@sandersn
sandersn merged commit dd8516b into master Jun 28, 2021
@sandersn
sandersn deleted the make-dom-mediacapture-record-work-on-4.4-dom branch June 28, 2021 18:07
@typescript-bot

Copy link
Copy Markdown
Contributor

I just published @types/[email protected] to npm.

@boris-petrov

Copy link
Copy Markdown
Contributor

This PR removes the type RecordingState and hence the error when I use the new package version:

node_modules/@types/dom-mediacapture-record/index.d.ts:58:21 - error TS2304: Cannot find name 'RecordingState'.

58     readonly state: RecordingState;
                       ~~~~~~~~~~~~~~

@donpark

donpark commented Jun 29, 2021

Copy link
Copy Markdown

Ran into same error over RecordingState although I have not yet located where it was defined before.

@sandersn

sandersn commented Jun 29, 2021 •

Copy link
Copy Markdown
Contributor Author

@boris-petrov you should only update to the latest if you have TS 4.4, which is still a day from shipping its beta.
You need to specify exact versions of any DOM polyfill package since the types have to match exactly.

In this case, I get can the package to work for all versions of TS by inlining the RecordingState type so that it works with older versions as well. I did that here: #54152

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). The CI failed When GH Actions fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants