A step towards https://tangled.org/@danabra.mov/typelex/issues/5.
This adds support for Externals, which are namespaces with @external decorator.
@external
namespace com.atproto.label.defs {
model Label { }
}
@external
namespace app.bsky.graph.defs {
model StarterPackViewBasic { }
model ListViewBasic { }
}
They do NOT get emitted as JSON. They only exist to represent external Lexicons for which you have only JSON.
Models inside @external namespaces must be empty. However, they're allowed to be @tokens which we need to know to disambiguate unions and knownValues. (In the future, it's possible we won't rely on knowing that, but for now we do.)
I've converted the playground to use externals properly. I will convert tests in a follow-up.