Skip to content

Commit

Permalink
fix(types): harden colors overload since r153
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Jul 12, 2023
1 parent 73965c7 commit 4400601
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/fiber/src/three-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ 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
// https://github.com/three-types/three-ts-types/pull/484
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 4400601

Please sign in to comment.