Are you an LLM? You can read better optimized documentation at /docs/metadata.md for this page in Markdown format
Metadata
oRPC procedures support metadata, simple key-value pairs that provide extra information to customize behavior.
Basic Example
ts
interface ORPCMetadata {
?: boolean
}
const =
.<ORPCMetadata>({}) // require define initial context
.(async ({ , , }, , ) => {
if (!['~orpc']..) {
return await ()
}
const = .('/') + .()
if (.()) {
return (.())
}
const = await ()
.(, .)
return
})
const =
.({ : true })
.(() => {
// Implement your procedure logic here
})INFO
The .meta can be called multiple times; each call spread merges the new metadata with the existing metadata or the initial metadata.
