Skip to content

Commit

Permalink
fix(plugin): fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
wzc520pyfm committed Apr 6, 2024
1 parent 65112c2 commit e0e84af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/plugin/formatDec/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DecimalColorRGBA } from "../../type";
import { DecimalColorRGB } from "../../type";

export {};

declare module "ohcolor" {
interface MyColor {
/** Override format: Support formatting to get decimal number. */
format<T extends "dec" = "dec", R = DecimalColorRGBA>(f: T): R;
format<T extends "dec" = "dec", R = DecimalColorRGB>(f: T): R;
}
}
4 changes: 2 additions & 2 deletions src/plugin/formatHex/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { StringColorRGBA } from "../../type";
import { StringColorRGB } from "../../type";

export {};

declare module "ohcolor" {
interface MyColor {
/** Override format: Support formatting to get color with hex string. */
format<T extends "hex" = "hex", R = StringColorRGBA>(f: T): R;
format<T extends "hex" = "hex", R = StringColorRGB>(f: T): R;
}
}
4 changes: 2 additions & 2 deletions src/plugin/outputGl/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { GlColorRGBA } from "../../type";
import { GlColorRGB } from "../../type";

export {};

declare module "ohcolor" {
interface MyColor {
/** Returns the luminance of the color. */
gl: () => GlColorRGBA;
gl: () => GlColorRGB;
}
}
4 changes: 2 additions & 2 deletions src/plugin/outputHex/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { StringColorRGBA } from "../../type";
import { StringColorRGB } from "../../type";

export {};

declare module "ohcolor" {
interface MyColor {
/** Returns the hex string of the rgba. */
hex: () => StringColorRGBA;
hex: () => StringColorRGB;
}
}

0 comments on commit e0e84af

Please sign in to comment.