acacode / acacode/swagger-typescript-api

Feature: Option to use 'unknown' instead of 'any'

Open
#526 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.1k
Forks
436
PR merge metrics
No merged PRs in 30d

Description

Hi,

I configured my typescript project to be as strict as possible to prevent as many runtime errors as possible. This includes denying the explicit usage of the `any` type. Using `any` in typescript is always unsafe and should only be used with care.

A command line option like `--unknown-instead-of-any` would be very nice :)

At the moment I added a `sed` command in my `package.json` to automatically replace all `any` with `unknown` in the generated typescript file, but I might not be the only one who prefers `unknown` over `any`.

Kind regards,
Marcel

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.