-
-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
typingSomething type relatedSomething type relatedv3Issues and PRs related to Remeda v3 (3.0.0) major version bump.Issues and PRs related to Remeda v3 (3.0.0) major version bump.
Description
When building a package that uses Remeda types in it's exported types TypeScript OOMs because our types are not exported by name, and thus require TypeScript to inline them. The more generic the exported type, the more this inlining becomes challenging, up to the point where TypeScript goes into an infinite loop recursing deeper and deeper into the type.
The fix is for us to export our returned types so that TypeScript can short-circuit this process and use our named exports directly.
See: #1175 (comment)
Functions known to cause issues: split, join, pick, omit...
Workarounds
- Avoid exporting generic functions that wrap these utilities
- Use explicit literal types instead of generics
- If you don't need
.d.tsoutput, disabledeclaration
hab25
Metadata
Metadata
Assignees
Labels
typingSomething type relatedSomething type relatedv3Issues and PRs related to Remeda v3 (3.0.0) major version bump.Issues and PRs related to Remeda v3 (3.0.0) major version bump.