Skip to main content

Type Alias: FactoryApp<F>

type FactoryApp<F> = F extends ProtocolFactory<ChainName, any> ? OvercastApp<F["name"], FactoryLayer<F>> : never;

Defined in: packages/overcast-core/src/multiapp.ts:79

The OvercastApp a factory builds, at that factory's own name and layer — and, given a union of factories, the union of their apps.

Built per factory rather than per name, which is what keeps it honest when the names are open: a host whose chains come from its environment has factories named string, so a lookup by name matches all of them, and pairing that name with the union of their layers would describe an app over EvmLayer | SolanaLayer that no chain actually builds. Distributing over the factories gives OvercastApp<string, EvmLayer> | OvercastApp<string, SolanaLayer> instead — and for literal names, exactly the one app it always did.

Type Parameters​

Type Parameter
F