- From: Jonas Sicking <jonas@sicking.cc>
- Date: Thu, 14 Aug 2014 16:30:33 -0700
- To: Marcos Caceres <marcos@marcosc.com>
- Cc: Domenic Denicola <domenic@domenicdenicola.com>, public-script-coord <public-script-coord@w3.org>, Dominique Hazael-Massieux <dom@w3.org>, Mounir Lamouri <mounir@lamouri.fr>
On Thu, Aug 14, 2014 at 1:36 PM, Marcos Caceres <marcos@marcosc.com> wrote: > interface ScreenOrientation { > Promise<undefined> lock (OrientationLockType orientation); > } It doesn't make sense to put a *value* between the <>. You should put a *type* there. I.e. it doesn't make sense to do Promise<1> returnOne(); The thing you do is Promise<integer> returnOne(); 'void' is the type for 'nothing', so that's what should be used for functions that only return undefined. Whether they return that synchronously or asynchronously. / Jonas
Received on Thursday, 14 August 2014 23:31:31 UTC