bynk.consumes.type_alias_capability
Error A capability was aliased in consumes U { Cap as Alias }; only exported types can be aliased.
as renames a type that the consumed context exports, for use in this one. A capability keeps its own name wherever it is used, in given and in calls. Select it bare, consumes payment { Gateway }, or consume the context without braces and write given payment.Gateway.
Example
context payment
exports capability { Gateway }
// shop.bynkcontext shop
consumes payment { Gateway as Pay } // ✗ a capability cannot be aliased
consumes payment { Gateway } // ✓ select it bareIn the Book
See also
- The grammar rule it governs:
consumes_decl. - Every code in its category, Consumes, on the diagnostic index.
bynk explain bynk.consumes.type_alias_capabilityshows the same from the installed toolchain, without a network.