🔎 Search Terms
Typescript Hangs, Memory Leak, VS Code, Prisma, React-Hook-Form,
🕗 Version & Regression Information
Tested on latest 5.2.2 and 5.3.0-dev-20231012. typescript@next
⏯ Playground Link
https://codesandbox.io/p/sandbox/musing-turing-78vp6j?file=%2Fapp%2Fpage.tsx%3A6%2C33
💻 Code
import{useForm}from"react-hook-form";import{Prisma}from"@prisma/client";exportdefaultfunctionHome(){constform=useForm<Prisma.UserCreateInput>();
...This will hang everything. Typescript won't tsc and intellisense will just sit with "loading" no matter what you hover.
meanwhile this works fine:
import{useForm}from"react-hook-form";import{Prisma}from"@prisma/client";exportdefaultfunctionHome(){constform=useForm<>();
...tsc --noEmit --extendedDiagnostics will complete in like 3 seconds with this.
🙁 Actual behavior
Typescript won't complete a tsc --noEmit and intellisense will just sit with "loading" no matter what you hover over. I have seen it once before just set everything to any
With the generated types in the first example - i let it run for 1 hour 59mins on a M1 mac and no output.
You can see the full code example with a minimal repro on the codesandbox link. It also hangs it's intellisense in CSB and won't tsc.
CPU also goes to 100% on both local and CSB
🙂 Expected behavior
Doesn't hang typescript, operates just like if you put any other type in there say
typeSomeType={name: string}constform=useForm<SomeType>()Additional information about the issue
Another report by someone else here:
https://stackoverflow.com/questions/76932600/high-cpu-usage-when-using-some-prisma-types-with-react-hook-form
It seems to be anything that comes off the Prisma.* types
🔎 Search Terms
Typescript Hangs, Memory Leak, VS Code, Prisma, React-Hook-Form,
🕗 Version & Regression Information
This is a crash
This is the behavior in every version I tried, and I reviewed the FAQ for entries about hanging.
Tested on latest 5.2.2 and 5.3.0-dev-20231012. typescript@next
⏯ Playground Link
https://codesandbox.io/p/sandbox/musing-turing-78vp6j?file=%2Fapp%2Fpage.tsx%3A6%2C33
💻 Code
This will hang everything. Typescript won't tsc and intellisense will just sit with "loading" no matter what you hover.
meanwhile this works fine:
tsc --noEmit --extendedDiagnosticswill complete in like 3 seconds with this.🙁 Actual behavior
Typescript won't complete a
tsc --noEmitand intellisense will just sit with "loading" no matter what you hover over. I have seen it once before just set everything toanyWith the generated types in the first example - i let it run for 1 hour 59mins on a M1 mac and no output.
You can see the full code example with a minimal repro on the codesandbox link. It also hangs it's intellisense in CSB and won't tsc.
CPU also goes to 100% on both local and CSB
🙂 Expected behavior
Doesn't hang typescript, operates just like if you put any other type in there say
Additional information about the issue
Another report by someone else here:
https://stackoverflow.com/questions/76932600/high-cpu-usage-when-using-some-prisma-types-with-react-hook-form
It seems to be anything that comes off the Prisma.* types