microsoft / microsoft/TypeScript
MediaTrackConstraintsSet misses torch
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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