microsoft / microsoft/TypeScript

MediaTrackConstraintsSet misses torch

Open
#39,010 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: lib.d.ts Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

I'd like to use the torch constraint but typescript complains as its missing in the defined set.

I understand the advanced field is controversial and might even be removed, but yet I think it is a bad idea if typescript disallows using the features when they are implemented...

TypeScript Version: 3.8.3
also master: https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L770

Code

track.applyConstraints({ advanced: [{ torch: this.torch }]});

Expected behavior:
not to be restricted in functionality when using typescript

Actual behavior:
I can't use this feature.. I have to switch to JS

Playground Link: Playground Link

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/lib.dom.d.ts at MediaTrackConstraintsSet, then review the linked Playground example using track.applyConstraints with advanced and torch. Compare the declaration with the reported browser feature and determine whether the missing member should be represented; done means the TypeScript example is accepted without switching to JavaScript.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.