Skip to content

API reference > @kontsedal/olas-core > ControllerDef

ControllerDef type ​

The handle returned by defineController(...). Pass it to createRoot(...) or ctx.child(...) to instantiate. Phantom types preserve Props / Api for inference via CtrlProps<C> / CtrlApi<C>.

Signature:

typescript
type ControllerDef<Props, Api> = {
  readonly [BRAND]: 'controller';
  readonly [PHANTOM]?: {
    props: Props;
    api: Api;
  };
};

Released under the MIT License.