Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (18 loc) · 903 Bytes

README.md

File metadata and controls

29 lines (18 loc) · 903 Bytes

tRPC API

Routes

The routes are defined in the src/routes directory.

  • lsp contains routes related to the language server protocol.
  • projects contains routes related to files and projects management.

Import types from LSP documentation

The language server protocol defines types for the inputs and outputs of the requests and notifications. These types can be downloaded from the website and put in the schemas/models.ts file.

npx ts-node ./src/import-types.ts

Once the types are imported, the models can be converted to zod schemas. You may need to manually update some types to make them compatible with zod.

Convert LSP models to zod schemas

To convert the models to zod schemas, run the following command:

npx ts-to-zod ./schemas/models.ts ./schemas/modelsZod.ts