Skip to content

Commit

Permalink
chore(types): return mapped type for splitProps excluded other value (
Browse files Browse the repository at this point in the history
#1994)

* chore(types): return mapped type for splitProps excluded `other` value

* add changeset

---------

Co-authored-by: Ryan Carniato <[email protected]>
  • Loading branch information
MrFoxPro and ryansolid authored Jan 3, 2024
1 parent 0d600e9 commit 40b5d78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-numbers-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solid-js": patch
---

chore(types): return mapped type for splitProps excluded `other` value
2 changes: 1 addition & 1 deletion packages/solid/src/render/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export type SplitProps<T, K extends (readonly (keyof T)[])[]> = [
? Pick<T, Extract<K[P], readonly (keyof T)[]>[number]>
: never;
},
Omit<T, K[number][number]>
{ [P in keyof T as Exclude<P, K[number][number]>]: T[P] }
];

export function splitProps<
Expand Down

0 comments on commit 40b5d78

Please sign in to comment.