-
-
Notifications
You must be signed in to change notification settings - Fork 106
[BUG] Typescript asks for delegation field when creating new polymorphic instance and providing id with a default of auto increment #1763
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
Comments
Hi @Tsimopak , thanks for the detailed repro steps. However I couldn't reproduce the issue following it. I've shared my project here: https://github.com/ymc9/issue-1763 Could you help check what might be different from yours? |
Hi @ymc9, When I clone your repo, do I also tried to close and get again to VSCODE and issue persists:
|
Description and expected behavior
Typescript asks for delegation field when creating new polymorphic instance when providing id with a default of auto increment.
Screenshots

Steps to reproduce
pnpm init
pnpm i -D typescript
npx tsc --init
npx zenstack init
npx zenstack generate && npx prisma migrate dev --name "update"
Now you will see that typescript shouts on
data
saying thattype
field is missing.Btw if you execute this code (You can run on terminal
npx tsx index.ts
) it will work just fine.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: