Skip to content

Typing

The @requence/service package supports automatic type generation for TypeScript. A dedicated CLI tool is provided for this purpose.

The CLI tool uses the previously created access token to connect to the Requence backend servers. Alternatively, you can provide the access token as a parameter.

Terminal window
requence-service generate-types
# alternative with explicite access token
requence-service generate-types --access-token=...

By default, the CLI tool generates a requence-env.d.ts file that includes the types of the service in all available versions. This behavior can be adjusted using the --outfile and --outdir parameters.

Terminal window
requence-service generate-types --outdir=src --outfile=requence-types.ts