visitTypedef()

in lib/generator.js [692:719]


  visitTypedef(type, module) {
    if (module && module.idType === 'module') {
      const aliasId = _name(module);
      if (this.moduleTypedef[aliasId] && this.moduleTypedef[aliasId][type]) {
        if (this.moduleTypedef[aliasId][type].import) {
          this.imports.push({
            packageName: this.moduleTypedef[aliasId][type].import,
            className: this.moduleTypedef[aliasId][type].type,
          });
        }
        
        return this.getTypedefType(this.moduleTypedef[aliasId][type].type);
      }
    }

    if (type.idType === 'typedef' && this.typedef[type.lexeme]) {
      if (this.typedef[type.lexeme]) {
        if (this.typedef[type.lexeme].import) {
          this.imports.push({
            packageName: this.typedef[type.lexeme].import,
            className: this.typedef[type.lexeme].type,
          });
        }

        return this.getTypedefType(this.typedef[type.lexeme].type);
      }
    }
  }