acacode / acacode/swagger-typescript-api

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

Aberta
#526 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
4.1k
Forks
436
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.