From eeaa7dd227cc9ba63f6d5dc9f9101515a7b7c37a Mon Sep 17 00:00:00 2001 From: Konstantin Burov Date: Fri, 29 Nov 2024 00:21:20 +1100 Subject: [PATCH] Fix constructor return type inference for published npm. # Conflicts: # src/Container.ts --- src/__tests__/Container.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/__tests__/Container.spec.ts b/src/__tests__/Container.spec.ts index 0a67495..705d8be 100644 --- a/src/__tests__/Container.spec.ts +++ b/src/__tests__/Container.spec.ts @@ -152,6 +152,7 @@ describe("Container", () => { } const containerWithService = container.providesClass("service", Item); expect(containerWithService.get("service")).toEqual(new Item(1)); + expect(containerWithService.factories.service().value).toBe(1); }); test("error if class constructor arity doesn't match dependencies", () => {