Skip to content

Commit

Permalink
Fix type definition for Color#to()
Browse files Browse the repository at this point in the history
  • Loading branch information
latin-1 authored and LeaVerou committed Dec 2, 2022
1 parent 8962db2 commit 3b2bbfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/src/color.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export type ToColorPrototype<T extends (...args: any[]) => any> = T extends (
color: Color,
...args: infer A
) => infer R
? (...args: A) => R
? T extends { returns: "color" }
? (...args: A) => Color
: (...args: A) => R
: never;

/** Proxy used for space accessors */
Expand Down

0 comments on commit 3b2bbfb

Please sign in to comment.