- From: <bugzilla@jessica.w3.org>
- Date: Thu, 27 Jun 2013 09:49:42 +0000
- To: public-script-coord@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21422 David Bruant <bruant.d@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bruant.d@gmail.com Summary|Futures |Generic Promise type | |notation --- Comment #2 from David Bruant <bruant.d@gmail.com> --- It's with a smile of happiness in my face that I noticed the following this morning [1] interface SubtleCrypto { // ... Promise<any> generateKey(AlgorithmIdentifier algorithm, bool extractable = false, KeyUsage[] keyUsages = []); // ... } IMO the most complete version should be "Promise<resultT, errorT>" where both the result and error type can be specified. Sweetened versions: * Promise<resultT> => Promise<resultT, Error> * Promise => Promise<any, Error> (not sure whether that should be Error or DOMError) Thoughts? [1] http://www.w3.org/TR/2013/WD-WebCryptoAPI-20130625/#dfn-SubtleCrypto -- You are receiving this mail because: You are on the CC list for the bug.
Received on Thursday, 27 June 2013 09:49:43 UTC