How this this syntax more useful than one derived from TS/Flow, like `x: Foo`? -----
Isiah Meadows m...@isiahmeadows.com www.isiahmeadows.com On Sun, Jun 3, 2018 at 11:48 AM, YU HengChun <achun....@qq.com> wrote: > Update > > > ## Compatibility > > For safety, it may be a good idea to use it with default values. > > ```js > let > isUndefined = void Number, > // Static type constraint does not take effect > isNumberUndefined = void(Number)|undefined; > // Static type constraint take effect > > ``` > > ## Pending > > I'm not sure if it is necessary to support multiple levels of nesting > > ```js > class ConfigType { > constructor() { > void { > version: Number, > encodeNames: Boolean, > lines: [String], > filename: String, > linker: undefined | { // Need support? > statics: { [String]: Number }, > } > }; > } > } > ``` > > > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss