resolveProps()

in src/resolver/client.js [140:160]


  resolveProps(ast) {
    this.comments = ast.comments;

    ast.moduleBody.nodes.filter((item) => {
      return item.type === 'type';
    }).forEach(item => {
      const prop = new PropItem();
      prop.name = item.vid.lexeme.replace('@', '_');
      prop.type = this.resolveTypeItem(item.value, item);
      prop.addModify(Modify.protected());
      if (item.tokenRange) {
        let comments = this.getFrontComments(item.tokenRange[0]);
        if (comments.length > 0) {
          comments.forEach(c => {
            this.object.addBodyNode(this.resolveAnnotation(c, this.object.index));
          });
        }
      }
      this.object.addBodyNode(prop);
    });
  }