As of today, any Web IDL using Promise needs to specify the type the
promise will be resolved with.
For example, an API that used to be written like this:
Promise getLength();
would now be written like this:
Promise<unsigned long> getLength();
If you don't put in the type, you will get invalid syntax errors from
the Web IDL parser.
If you have no idea what you'll resolve the Promise with, use
Promise<any> as a last resort: it bypasses some sanity-checking codegen
can otherwise do on Promise-returning functions.
If you plan to resolve with undefined, use Promise<void>.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform