Add type safety to customBadges

please be happy github actions

`integer` not `int`

How did my code compile?

Use proper touple syntax

Ok

Fix array type for customBadges

this took too long.
This commit is contained in:
WinnerWind 2025-07-15 10:26:38 +05:30
parent 4eba49b51a
commit 72a8e4b8c7

View File

@ -98,7 +98,7 @@ const REGEXP = /\[!!([^\]]+)\]/gm
const CODEREGEX = /`([^`\n]+)`/g const CODEREGEX = /`([^`\n]+)`/g
export interface Options { export interface Options {
customBadges: Array, // Write in format [ [icon,name,[RED,GREEN,BLUE,ALPHA],TEXT_ALPHA], [icon,name,[RED,GREEN,BLUE,ALPHA],TEXT_ALPHA] ] customBadges: Array<[string, string, [number, number, number, number], number]>, // Write in format [ [icon,name,[RED,GREEN,BLUE,ALPHA],TEXT_ALPHA], [icon,name,[RED,GREEN,BLUE,ALPHA],TEXT_ALPHA] ]
} }
const defaultOptions: Options = { const defaultOptions: Options = {