Skip to content

[HOLD for payment 2024-08-19] [TS] Memoize utility lacks correct typings for transformKey option when called with constructable #46067

@kacper-mikolajczak

Description

@kacper-mikolajczak

Details

This is a known regression, which originates from #43868

memoize module lacks correct typings for transformKey option when called with constructables (entities which are initialized with new keyword).

Steps to reproduce

  1. Wrap constructable (some class for example) with memoize method
  2. Pass configuration (second argument) with transformKey callback
  3. Check the typings of transformKey callback's arguments

Expected behaviour

transformKey arguments match constructor's arguments

Actual behaviour

transformKey arguments are typed as readonly [] (empty tuple)

Screenshot 2024-07-23 at 21 54 48

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions