Skip to content

Conversation

@fitztrev
Copy link
Member

This uses openapi-typescript to generate a typescript declaration file from the openapi docs.

I'm using the companion package (openapi-fetch) in the Broadcaster app and it's nice. I'm able to type check routes and params, and get the responses type-checked and know the schema.

Here's a standalone script that shows an example usage: https://github.com/fitztrev/game-replay/blob/main/src/16816.ts

if this is merged, it will need a repo secret NPM_TOKEN added with write perms to https://www.npmjs.com/package/@lichess-org/types

@ornicar ornicar merged commit e8c8370 into lichess-org:master Apr 19, 2025
1 check passed
@ornicar
Copy link
Contributor

ornicar commented Apr 19, 2025

✔️ repo secret

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.

2 participants