// Generated by bynkc — do not edit by hand.
// context callgraph

import { Ok, Err, Some, None, type Result, type Option, type ValidationError } from "./runtime.js";

export interface Counter {
  readonly n: number;
}

export const Counter = {
  bump(self: Counter): number {
    return helper(self.n);
  },
};

export function helper(x: number): number {
  return x + 1;
}

export function caller(x: number): number {
  return helper(x);
}

export const api = {
  async call(c: Counter, deps: {}): Promise<number> {
    return caller(c.n);
  },
};

export interface CallgraphDeps {
}

export function makeSurface(deps: CallgraphDeps) {
  return {
    async api(c: Counter): Promise<number> {
      return api.call(c, deps);
    },
  };
}

