diff --git a/src/Container.ts b/src/Container.ts index 0694c34..584c8c4 100644 --- a/src/Container.ts +++ b/src/Container.ts @@ -36,6 +36,14 @@ export type ContainerToken = typeof CONTAINER; type ArrayElement = A extends readonly (infer T)[] ? T : never; +type ReturnTypeOfFactories = T extends { factories: infer R } ? R : never; + +/** + * Helper type for extracting valid keys from a container instance + */ +export type ContainerKeys = keyof ReturnTypeOfFactories; + + /** * Represents the dependency injection container that manages the registration, * creation, and retrieval of services. The Container class is central to