Skip to content
Playground(another site)

bynk.types.asset_at_boundary

Error An Asset type appears in a record field, boundary or store position; pass its .url instead.

An Asset names a file the platform serves; it is not data to keep or send. So an Asset cannot be a record field, a sum payload, an event field, an agent key or store field, or part of a service or agent handler signature. What crosses is its .url, a String: hold that instead. Other types refused there include bynk.types.function_at_boundary and bynk.types.held_at_boundary.

Example

type Page = {
title: String,
style: Asset, // ✗ an asset is not a value to hold
}
type Page = {
title: String,
style: String, // ✓ keep its `.url`
}

In the Book

See also

  • Every code in its category, Type checking, on the diagnostic index.
  • bynk explain bynk.types.asset_at_boundary shows the same from the installed toolchain, without a network.