Skip to content

Deprecated types are not seen as such #4366

@Sytten

Description

@Sytten

Bug description

All the top level types except enums have been deprecated. They should appear with a strike in VSCode and they should show up when using https://github.com/gund/eslint-plugin-deprecation.
Currently then don't, making the upgrade process tedious.

How to reproduce

Steps to reproduce the behavior:

  1. Import a deprecated type in a TS file
  2. Check if the type is marked as deprecated

Expected behavior

The problem is that is doesn't seem to care about the JSDoc of the type alias. This is due to the export import trick used here: https://github.com/prisma/prisma/blob/master/src/packages/client/src/generation/TSClient/TSClient.ts#L287
Since it is not really an import from another module, a simple export type fixes the issue and properly displays the deprecation.

Environment & setup

  • Prisma version: 2.12.0

Metadata

Metadata

Assignees

Labels

bug/2-confirmedBug has been reproduced and confirmed.kind/bugA reported bug.tech/typescriptIssue for tech TypeScript.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions