Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete missing for Payload types #4968

Open
ryands17 opened this issue Jan 12, 2021 · 2 comments
Open

Autocomplete missing for Payload types #4968

ryands17 opened this issue Jan 12, 2021 · 2 comments
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: client types Types in Prisma Client

Comments

@ryands17
Copy link

Bug description

When creating a type for a specific payload, autocomplete for the fields is not shown.

How to reproduce

  1. Prisma schema
model User {
  id    Int     @id @default(autoincrement())
  name  String?
}
  1. Create a type with a specific payload:
type UserWithId = Prisma.UserGetPayload<{
  select: { id: true }
}>

Autocomplete in VSCode doesn't show the relevant fields:

image

Expected behavior

The fields from the User model should be available in select.

Environment & setup

  • OS: Mac OS
  • Node.js version: 12.20.0
  • Prisma version: 2.14.0
@williamluke4
Copy link
Contributor

@matthewmueller matthewmueller modified the milestones: 2.16.0, 2.17.0 Feb 3, 2021
@Jolg42 Jolg42 removed this from the 2.17.0 milestone Nov 3, 2021
@Jolg42
Copy link
Member

Jolg42 commented Nov 3, 2021

The TypeScript issue mentioned, shows that it's fixed and will be shipped with TypeScript 4.5.0, to be confirmed after that happens.

Release is planned for November 16th from microsoft/TypeScript#45418

@janpio janpio added the topic: client types Types in Prisma Client label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: client types Types in Prisma Client
Projects
None yet
Development

No branches or pull requests

7 participants