alepha@docs:~/framework/docs/reference/providers$
cat ProductKindRegistry.md | pretty
1 min read
Last commit:

#ProductKindRegistry

#Import

typescript
1import { ProductKindRegistry } from "alepha";

#Overview

Extension point letting any module teach the catalog a new kind of sellable thing.

A module adds its handler from its register hook:

ts
1$module({2  name: "myapp.pos",3  services: [WalletTopUpHandler],4  register: (alepha) => {5    alepha.inject(ProductKindRegistry).add(alepha.inject(WalletTopUpHandler));6  },7});

Same shape as RootComponentsProvider in alepha/react/router - a plain collection that modules contribute to, resolved at use time.