Documentation / @super-line/react / Register
Interface: Register
Defined in: index.ts:550
Declare your contract and role ONCE, by declaration merging, and the module-level hooks in this package are typed by it:
Example
ts
declare module '@super-line/react' {
interface Register {
contract: typeof app
role: 'user'
}
}Register is a PROGRAM-WIDE singleton: exactly one declaration per TypeScript program (a second one is an interface merge conflict). Note for LIBRARY authors: this is a global augmentation — keep the declaration in a source-only ambient file your .d.ts build does not emit, or every consumer inherits it and one with its own contract cannot override it.