Skip to content

Circular references and long namespaces #1772

Open
@supersteves

Description

@supersteves

I'm using goog.modules and there are some cases where circular references mean I need:

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:

        /**
         * @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:

        /**
         * @type {a.b.c.y}
         */
        this.yyy = null;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions