From 17bc96bfccae096b8cc7b23ce304068619b202cf Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Sun, 22 Sep 2024 15:25:07 +0200 Subject: [PATCH] Fix three-types --- packages/fiber/src/three-types.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/fiber/src/three-types.ts b/packages/fiber/src/three-types.ts index a9e169719f..c150b95038 100644 --- a/packages/fiber/src/three-types.ts +++ b/packages/fiber/src/three-types.ts @@ -46,7 +46,9 @@ export interface NodeProps { } export type ExtendedColors = { [K in keyof T]: T[K] extends THREE.Color | undefined ? Color : T[K] } -export type Node = ExtendedColors, NodeProps>> +export type Node = [T] extends [{ thisShouldNeverHappen: 'unless the object is of type any' }] + ? ExtendedColors, NodeProps<{}, {}>>> + : ExtendedColors, NodeProps>> export type Object3DNode = Overwrite< Node,