From de5f224f548b28c9e52943357a36fa1b798a0be2 Mon Sep 17 00:00:00 2001 From: Cody Bennett Date: Wed, 12 Jul 2023 07:25:11 -0500 Subject: [PATCH] fix(types): harden colors overload since r153 (#2931) --- 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 9b6aa672e5..da83071fb9 100644 --- a/packages/fiber/src/three-types.ts +++ b/packages/fiber/src/three-types.ts @@ -27,7 +27,9 @@ export type Vector2 = VectorLike export type Vector3 = VectorLike export type Vector4 = VectorLike export type Color = ConstructorParameters | THREE.Color | number | string // Parameters will not work here because of multiple function signatures in three.js types -export type ColorArray = typeof THREE.Color | Parameters +// r153 compat, same issue as above +// https://github.com/pmndrs/react-three-fiber/issues/2926 +export type ColorArray = typeof THREE.Color | [color: THREE.ColorRepresentation] export type Layers = THREE.Layers | Parameters[0] export type Quaternion = THREE.Quaternion | Parameters