Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

ProjectedEntity<S> = { readonly [K in keyof S as Selected<S[K]> extends true ? K : never]: K extends keyof Entity ? NonNullable<Entity[K]> : never } & S extends object ? Pick<Entity, "toText" | "toJson"> : unknown

Defined in: src/query/selection.ts:69

The result of a selection S: an Entity narrowed to exactly the selected fields (each non-undefined). The shape is flat — select({ owner: true }) yields { owner: Hex }, read as entity.owner. Accessing an unselected field is a compile error.

toText() / toJson() operate on the payload, so they appear only when payload was selected — calling them otherwise would always throw.

S