reluxscript 0.1.4

Write AST transformations once. Compile to Babel, SWC, and beyond.
Documentation
// Generated by ReluxScript compiler
// Do not edit manually

module.exports = function({ types: t }) {
  
  let state = {};
  
  return {
    visitor: {
      TSInterfaceDeclaration(path) {
        const node = path.node;
        let parts = [];
        const interface_name = node.id.name;
        parts.push(interface_name);
        for (const member of node.body.body) {
          if ((t.isTSPropertySignature(member))) {
            const prop_name = member.key.name;
            parts.push(prop_name);
          }
        }
        return parts.join(",");
      },
      CallExpression(path) {
        const node = path.node;
        if ((t.isIdentifier(node.callee))) {
          const callee_name = node.callee.name;
          if ((callee_name === "useState")) {
            return callee_name;
          }
        }
        return "";
      }
    }
  };
};