deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.24k stars 124 forks source link

fix(type): Fix reflection on mapped types, fixes #514 #515

Closed SamJakob closed 10 months ago

SamJakob commented 12 months ago

Summary of changes

This enables the optional property to be carried forward from a mapped propertySignature by retaining the information about the signature on the parent (without retaining all of the parent information).

This should solve the issue on any mapped type, but specifically this should accommodate many of the TypeScript utility classes (e.g., Pick) as described in #514

License/Waiver

I hereby release these code changes under the MIT license but waive the requirement for name attribution, inclusion of copyright and/or permission notice.

SamJakob commented 12 months ago

I'm also not sure why this test case is failing:

FAIL packages/injector/tests/injector.spec.ts
  ● PartialFactory

It works on my machine... ™️

marcj commented 10 months ago

fixed in https://github.com/deepkit/deepkit-framework/commit/f2091d0beeb7360d0bdcc7475d0c88e53dee5de2, thanks @SamJakob !