Files
shields/badge-maker/index.d.ts
valkyrie_pilot 9ab1a906b2 Add option for IDs to have a prefix (#10576)
* Add option for IDs to have a prefix

* Switch to suffixes to protect ID values

* Document idSuffix

* Fix validation error message consistency

* Fix ID suffix regex test

* Add tests

* snapshot tests for idSuffix covering all 5 badge styles

* tweak docs

* update typescript definitions

* badge-maker 4.1.0 release

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
2024-10-13 16:47:50 +00:00

15 lines
349 B
TypeScript

interface Format {
label?: string
message: string
labelColor?: string
color?: string
style?: 'plastic' | 'flat' | 'flat-square' | 'for-the-badge' | 'social'
logoBase64?: string
links?: Array<string>
idSuffix?: string
}
export declare class ValidationError extends Error {}
export declare function makeBadge(format: Format): string