Skip to content

feat(core): convert the gist api handler to TypeScript - #512

Open
marcalexiei wants to merge 1 commit into
stats-organization:masterfrom
marcalexiei:core-ts
Open

feat(core): convert the gist api handler to TypeScript#512
marcalexiei wants to merge 1 commit into
stats-organization:masterfrom
marcalexiei:core-ts

Conversation

@marcalexiei

Copy link
Copy Markdown

Another step of #140

  • api/gist.js ➡️ api/gist.ts
  • The handler parses (parseFloat, parseBoolean); the card still defaults.
    Passing undefined for an absent param keeps every default in one place.
  • CommonOptions ➡️ CommonCardOptions, now extending ColorParams since cards spread
    their options into getLightDarkColors.
  • locale moved onto the four cards that read it: the gist card has no translated text.
    The gist handler no longer takes or validates it, so /api/gist?locale=xx renders the card instead of "Language not found". Docs has been updated.
  • border_radius is now validated at the boundary: ?border_radius=abc returns a permanent Invalid number input for parameter "border_radius" instead of a temporary error leaking Card's internal Invalid border radius: "NaN".

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@marcalexiei is attempting to deploy a commit to the martin-mfg's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant