google / google/closure-compiler
Circular references and long namespaces
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
I'm using goog.modules and there are some cases where circular references mean I need:
``` javascript
goog.module("a.b.c.x");
const y = goog.module.get("a.b.c.y");
goog.module("a.b.c.y");
const x = goog.require("a.b.c.x");
```
However some change in the past 3 months has broken the use of local aliases in type annotations:
``` javascript
/**
* @type {y}
*/
this.yyy = null;
```
```
myfile.js:26: WARNING - Bad type annotation. Unknown type module$contents$a$b$c$x_y
24|
25| /**
26| * @type {y}
27| */
28| this.yyy = null;
```
Instead I now need to use the full long namespace:
``` javascript
/**
* @type {a.b.c.y}
*/
this.yyy = null;
```
Contributor guide
Assessment
This issue has not been assessed yet.