Skip to content

Commit

Permalink
Fix three-types
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaselmer committed Sep 22, 2024
1 parent e9e820a commit 17bc96b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/fiber/src/three-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export interface NodeProps<T, P> {
}

export type ExtendedColors<T> = { [K in keyof T]: T[K] extends THREE.Color | undefined ? Color : T[K] }
export type Node<T, P> = ExtendedColors<Overwrite<Partial<T>, NodeProps<T, P>>>
export type Node<T, P> = [T] extends [{ thisShouldNeverHappen: 'unless the object is of type any' }]
? ExtendedColors<Overwrite<Partial<{}>, NodeProps<{}, {}>>>
: ExtendedColors<Overwrite<Partial<T>, NodeProps<T, P>>>

export type Object3DNode<T, P> = Overwrite<
Node<T, P>,
Expand Down

0 comments on commit 17bc96b

Please sign in to comment.