generated from fastify/skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
N/A
Plugin version
No response
Node.js version
N/A
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
N/A
Description
The return value of deepmerge is incorrect when the inputs contain a readonly array.
Steps to Reproduce
import makeDeepmerge from "@fastify/deepmerge";
const deepmerge = makeDeepmerge();
const a1 = ['a', 'b'] as const;
const a2 = ['c'] as const;
const m = deepmerge(a1, a2);The type of m is readonly ["c"] which is incorrect.
Expected Behavior
The type of m should be ["a" | "b" | "c"] (or even better, ["a", "b", "c"] in this case since the inputs are tuples).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels