Skip to content
Playground(another site)

bynk.exports.undeclared_type

Error exports names a type that is not declared.

An exports clause lists types this context declares, to make them visible to the contexts that consume it. A name the context does not declare has nothing to export: it is usually a misspelling, or a type that is declared elsewhere. Correct the name, or declare the type in this context. A name in exports capability that is not declared is bynk.exports.undeclared_capability.

Example

exports opaque { Ordr } // ✗ no type `Ordr` in this context
type Order = { total: Int }
exports opaque { Order } // ✓ the declared name

In the Book

See also

  • The grammar rule it governs: exports_decl.
  • Every code in its category, Exports, on the diagnostic index.
  • bynk explain bynk.exports.undeclared_type shows the same from the installed toolchain, without a network.