Skip to content

Commit

Permalink
fix(types): harden colors overload since r153 (#2931)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Jul 12, 2023
1 parent 73965c7 commit de5f224
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 @@ -27,7 +27,9 @@ export type Vector2 = VectorLike<THREE.Vector2>
export type Vector3 = VectorLike<THREE.Vector3>
export type Vector4 = VectorLike<THREE.Vector4>
export type Color = ConstructorParameters<typeof THREE.Color> | THREE.Color | number | string // Parameters<T> will not work here because of multiple function signatures in three.js types
export type ColorArray = typeof THREE.Color | Parameters<THREE.Color['set']>
// 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<THREE.Layers['set']>[0]
export type Quaternion = THREE.Quaternion | Parameters<THREE.Quaternion['set']>

Expand Down

0 comments on commit de5f224

Please sign in to comment.