hegemonic / catharsis

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

Allow Closure Compiler path types #52

Closed ahocevar closed 3 years ago

ahocevar commented 6 years ago

This pull request adds support for Closure Compiler path types, e.g.

/** @param {./foo.Foo} Foo */
function(Foo) {}

This way of defining types is useful in combination with modules, and avoids that the module providing the used type has to be imported, when it is only used for types.

When the new moduleRoot option is set, the path type above will be resolved to a JSDoc module type (e.g. module:foo.Foo).

ahocevar commented 6 years ago

@hegemonic Is there anything else I can do to get this reviewed? We would really like to continue using JSDoc for https://github.com/openlayers/openlayers for the 5.x release, which will use Closure path types. And this pull request here is a prerequisite for that (jsdoc3/jsdoc#1486). You can find a usage example of what we are doing at https://github.com/openlayers/closure-es-modules/.

ahocevar commented 3 years ago

This is no longer relevant. I took the opposite approach and created https://github.com/openlayers/jsdoc-plugin-typescript instead.