Microsoft/TypeScript

MediaTrackConstraintsSet misses torch

Open

#39,010 建立於 2020年6月10日

在 GitHub 查看
 (1 留言) (3 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: lib.d.tsHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

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

貢獻者指南