Skip to content
Playground(another site)

bynk.capability.unknown_operation

Error Referenced an operation the capability does not declare.

A capability is an interface: its operations are exactly the fn signatures in its declaration, and a provider supplies nothing more. Calling Clock.nope() asks for an operation the capability does not declare, which usually means a misspelt name. Call one of the declared operations, or add the new operation to the capability and to each provider of it.

Example

capability Clock {
fn now() -> Effect[Int]
}
Clock.nope() // ✗ `Clock` declares no `nope`
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.unknown_operation shows the same from the installed toolchain, without a network.