hegemonic / catharsis

A JavaScript parser for Google Closure Compiler and JSDoc type expressions.
MIT License
54 stars 14 forks source link

Allow function types to be wrapped in parentheses #42

Open hegemonic opened 9 years ago

hegemonic commented 9 years ago

In some type unions, you need to enclose function types in parentheses to disambiguate the return value (for example, (function(string): boolean)|undefined. We should support this pattern in Catharsis, at least for functions with return values.