diff --git a/test/merge.ts b/test/merge.ts index 972ac51..4116580 100644 --- a/test/merge.ts +++ b/test/merge.ts @@ -26,4 +26,19 @@ describe("mixme.merge", () => { const obj = Object.create({}); should(obj.polluted).be.Undefined(); }); + it("generic interface matching", () => { + interface Test { + a?: string; + b?: string; + } + interface Result { + a: string; + b: string; + } + const test: Test = { + b: "A", + }; + const res: Result = merge({ b: "B" }, test); + console.log(res); + }); });