How to use the capnp-ts/lib/std/schema.capnp.Node_Which function in capnp-ts

To help you get started, we’ve selected a few capnp-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdiaz5513 / capnp-ts / packages / capnpc-ts / src / generators.ts View on Github external
break;

    case s.Node.INTERFACE:
      generateStructNode(ctx, node, true);

      break;

    case s.Node.ANNOTATION:
      trace("ignoring unsupported annotation node: %s", node.getDisplayName());

      break;

    case s.Node.FILE:
    default:
      throw new Error(format(E.GEN_NODE_UNKNOWN_TYPE, s.Node_Which[whichNode]));
  }
}