Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(types): export function definition types #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simonepizzamiglio
Copy link

@simonepizzamiglio simonepizzamiglio commented Jan 22, 2025

Fixes #12.

While working on one of my private projects, I encountered the same issue described in #12.
I’m using deepmerge with TypeScript, and when building my project, I experienced the heap out of memory error mentioned in that issue.

To resolve this, I tried exporting DeepMergeFn and DeepMergeAllFn directly from the @fastify/deepmerge folder in node_modules, which successfully fixed the problem.

Alternatively, if the issue persists, you can leverage these types as follows:

const deepmergeAll: DeepMergeAllFn = deepmerge({ all: true });

Checklist

@simonepizzamiglio simonepizzamiglio marked this pull request as ready for review January 22, 2025 23:02
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening a PR! Can you please add a unit test? We use tsd for types.

@simonepizzamiglio
Copy link
Author

Thanks for opening a PR! Can you please add a unit test? We use tsd for types.

@mcollina Tests added 🙂

@Fdawgs Fdawgs requested a review from a team January 27, 2025 08:40
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess exporting the types wont harm ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants