You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we see it expects objects but in setNodes usage of merge doesn't match the type as we pass values key by key: packages\slate\src\transforms-node\set-nodes.ts
Activity
skorenb commentedon Aug 21, 2024
merge function has type PropsMerge which is defines as:
As we see it expects objects but in
setNodesusage of merge doesn't match the type as we pass values key by key:packages\slate\src\transforms-node\set-nodes.ts
Thus i guess
PropsMergetype should expect key and appropriate values of descendant, similar to this:I have no idea how to implement this to get it working with typescript inferring
Fix `PropsMerge` type so `setNodes` `merge` can return scalars
Fix `PropsMerge` type so `setNodes` `merge` can return scalars (#6137)
dylans commentedon Oct 10, 2026
Fixed by #6137: the
mergeoption's type now accepts and returns any value, so the scalarssetNodespasses type-check.