Microsoft/TypeScript

MediaTrackConstraintsSet misses torch

Open

#39,010 opened on Jun 10, 2020

View on GitHub
 (1 comment) (3 reactions) (0 assignees)TypeScript (6,726 forks)batch import
BugDomain: lib.d.tsHelp Wanted

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (Avg merge 6d 17h) (9 merged PRs in 30d)

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