microsoft / microsoft/TypeScript
MediaTrackConstraintsSet misses torch
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in lib/lib.dom.d.ts, in corrispondenza di MediaTrackConstraintsSet, quindi esamina l'esempio Playground collegato che usa track.applyConstraints con advanced e torch. Confronta la dichiarazione con la funzionalità del browser segnalata e determina se il membro mancante debba essere rappresentato; il lavoro è completato quando l'esempio TypeScript viene accettato senza passare a JavaScript.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- web-dev
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100