---
A service whose `on call` takes more than one Bynk-declared argument. The deps
object is the *last* parameter, so `makeSurface` must derive its type from a
named `<Ctx>Deps` interface rather than a fixed `Parameters<>[1]` index (which
would resolve to the second real argument, `target`).
---
context demo.registry

exports transparent { RegError }

type Code = String where Matches("[a-z0-9]{3,8}")

type Target = String where Matches("https?://.+")

type RegError = enum {
	Rejected,
}

capability Clock {
	fn now() -> Effect[Int]
}

provides Clock = SystemClock {
	fn now() -> Effect[Int] {
		0
	}
}

service create {
	on call(code: Code, target: Target) -> Effect[Result[Int, RegError]]
			given Clock {
		let t <- Clock.now()
		Ok(t)
	}
}
