// Generated by bynkc — do not edit by hand.
// context demo.svc

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

export interface Counter {
  next(seed: number): Promise<number>;
}

export const CounterToken: unique symbol = Symbol("Counter");

export const compute = {
  async call(start: number, deps: { Counter: Counter }): Promise<number> {
    const a = await deps.Counter.next(start);
    const b = await deps.Counter.next(a);
    return b;
  },
};

export interface DemoSvcDeps {
  readonly Counter: Counter;
}

export function makeSurface(deps: DemoSvcDeps) {
  return {
    async compute(start: number): Promise<number> {
      return compute.call(start, deps);
    },
  };
}

