Skip to content

Commit 1b80b1e

Browse files
add colors type definitions
1 parent 79466c1 commit 1b80b1e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

index.d.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,23 @@ export const Ads: any; // export { default as Ads } from './src/Ads'
2222
export { AppData, FontFaceDefinition } from './src/Application/index.js';
2323
export { default as Application } from './src/Application/index.js';
2424
export const AudioPlayer: any; // export { default as AudioPlayer } from './src/AudioPlayer'
25-
export const Colors: any; // export { default as Colors } from './src/Colors'
25+
export type ColorTransform = {
26+
alpha(value: number): ColorTransform;
27+
hue(value: number): ColorTransform;
28+
lightness(value: number): ColorTransform;
29+
saturation(value: number): ColorTransform;
30+
lighter(value: number): ColorTransform;
31+
darker(value: number): ColorTransform;
32+
mix(color: string, percentage: number): ColorTransform;
33+
get(): number;
34+
};
35+
36+
export type Colors = {
37+
(colorName: string): ColorTransform;
38+
} & {
39+
[colorName: string]: ColorTransform;
40+
};
41+
export const Colors: Colors; // export { default as Colors } from './src/Colors'
2642
export { default as Img } from './src/Img/index.js';
2743
export const Keyboard: any; // export { default as Keyboard } from './src/Keyboard'
2844
export { default as Launch } from './src/Launch/index.js';

0 commit comments

Comments
 (0)