Skip to content

Commit

Permalink
Update types for getAll
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Feb 10, 2024
1 parent 70dc9dc commit b8590c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/src/getAll.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import ColorSpace from "./space.js";

export default function getAll (
color: Color | ColorObject,
space: string | ColorSpace
space?: string | ColorSpace
): [number, number, number];
3 changes: 1 addition & 2 deletions types/test/getAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import sRGB from "colorjs.io/src/spaces/srgb";

// @ts-expect-error
getAll();
// @ts-expect-error
getAll(new Color("red"));

getAll(new Color("red")); // $ExpectType [number, number, number]
getAll(new Color("red"), "srgb"); // $ExpectType [number, number, number]
getAll(new Color("red"), sRGB); // $ExpectType [number, number, number]

0 comments on commit b8590c8

Please sign in to comment.