Look at this scene
I have a type Item
that wrapped with some util type, and I want get a simplify Item
, like:
import type { SimplifyDeep } from 'type-fest/source/merge-deep'
type SimplifyItem = SimplifyDeep<Item>
// => expect type SimplifyItem = { name: string, color: THREE.Color }
but actual rsult is:
import type { SimplifyDeep } from 'type-fest/source/merge-deep'
type SimplifyItem = SimplifyDeep<Item>
/**
type SimplifyItem = {
name: string,
color: {
readonly isColor: true;
r: number;
g: number;
b: number;
set: (color: string | number | Color) => Color;
... 31 more ...;
toArray: {
...;
};
};
}
*/
so maybe we can add a exclude type option ( or named keep
) on Deep type like:
import type { SimplifyDeep } from 'type-fest/source/merge-deep'
type SimplifyItem = SimplifyDeep<Item, { exclude: THREE.Color }>
// => expect type SimplifyItem = { name: string, color: THREE.Color }
It can also resolve scene conflicts between users, such as one want recursive into HTMLElemet
, anther one want keep HTMLElemet
Related comment: #651 (comment)
Related issue: #651
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too