Open
Description
A key component to avoiding circular dependencies is the option to reference a type without importing the module.
Example:
import ModelEvent from './model-event';
export default class Model extends EventTarget {
changeItem(item) {
this.item = item;
this.dispatchEvent(new ModelEvent('change:'+item.name, this, item));
}
}
import Model from './model';
export default class ModelEvent extends Event {
/**
* @param {string|!goog.events.EventId} type Event Type.
* @param {!Model} model
*/
constructor(type, model) {
}
}
We need a way (without requiring closure-library) to import or reference a type from another module.