Skip to content
Playground(another site)

bynk.capability.base_not_instantiable

Error A derived capability's base is not a platform resource that can be instantiated.

A derived capability is another instance of a platform resource, with a namespace, bucket or limiter of its own. Only a platform resource kind, such as Kv or R2, has instances. A capability such as Clock has no resource to separate, so there is nothing to derive; use it bare, with given Clock.

Example

consumes bynk { Clock }
capability Ticks = Clock // ✗ `Clock` has no named instances
service probe {
on call() -> Effect[Instant] by Caller given Clock { // ✓ use it bare
Clock.now()
}
}

In the Book

See also

  • The grammar rule it governs: capability_decl.
  • Every code in its category, Capabilities, on the diagnostic index.
  • bynk explain bynk.capability.base_not_instantiable shows the same from the installed toolchain, without a network.