Skip to content

Documentation / @super-line/core / Contract

Interface: Contract

Defined in: packages/core/src/contract.ts:64

The single source of truth, imported by both server and client. Split by direction and scoped by role: a shared base every role inherits, plus one block per role. serverToServer is node↔node (not role-scoped).

Properties

roles

roles: Record<string, RoleBlock>

Defined in: packages/core/src/contract.ts:68

Per-role surfaces. A connection's role selects which one (plus shared) it sees.


serverToServer?

optional serverToServer?: Record<string, Schema>

Defined in: packages/core/src/contract.ts:70

Typed node-to-node event payloads, for "@super-line/server"!'s emitServer/onServer.


shared?

optional shared?: Directional

Defined in: packages/core/src/contract.ts:66

Surface common to every role (merged into each role's effective surface).

Released under the MIT License.