Skip to content

Improve TypeScript documentation and Strict TypeScript Wirespec client example #501

@Camphul

Description

@Camphul

Is your feature request related to a problem? Please describe.
(issue is similar to #492 but has some differences)

Implementing a Wirespec API client in TypeScript in existing projects is a hassle which developers don't want to handle. Setting strict to false in tsconfig.json solves the type issues for Wirespec but break our entire existing project (with i18n, vite, etc...). And casting to correct types isn't too nice. This blocks developer adoption.

The documentation also doesn't mention clientSimple.ts as example. Documentation on how to write a TypeScript API client should be added (or at least reference the example).

Describe the solution you'd like

  • Have clientSimple.ts adhere to a strict tsconfig by default. It will then also work when strict is set to false.
  • Improve documentation regarding TypeScript integration.

Requirements

  • Have the clientSimple.ts work with a strict tsconfig.
  • Documentation describing how to implement API client and endpoints in TypeScript (endpoint implementation with express would be fine, use fetch for API client).

Additional information
Missing this is making adoption more difficult, I might make a PR for the TypeScript API client if I manage to fix it (no TypeScript expert).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions