microsoft / microsoft/TypeScript
MediaTrackConstraintsSet misses torch
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.4k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 117
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 lib/lib.dom.d.ts 中的 MediaTrackConstraintsSet 开始,然后查看使用 advanced 和 torch 调用 track.applyConstraints 的关联 Playground 示例。将该声明与报告的浏览器功能进行比较,并确定是否应表示缺失的成员;完成的标准是 TypeScript 示例在不切换到 JavaScript 的情况下被接受。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- web-dev
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100