Ricardo Busquet
Ricardo Busquet
@clarkmcadoo yes. I marked the typescript error with `@ts-expect-error` and forced the type of the return from `setup()`: ```ts // @ts-expect-error misconfiguration on userEvent types const user: ReturnType = userEvent.setup();...
I have absolutely no idea on the impact of the comment, but now the `user` returned from setup has the right type, and `userEvent.setup()` runs correctly when turned into javascript.
@clarkmcadoo not actually. I'll see if I can get this to work in the repro
@clarkmcadoo [repro](https://codesandbox.io/p/github/ricardo-passthrough/userevent-nodenext-repro/draft/beautiful-jerry?file=%2Findex.test.tsx%3A14%2C1&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522vertical%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522DEVTOOLS_PANELS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clgr11t6d00093b6id8cmkdak%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clgr11t6d00093b6id8cmkdak%2522%253A%257B%2522id%2522%253A%2522clgr11t6d00093b6id8cmkdak%2522%252C%2522activeTabId%2522%253A%2522cljyhdd0n05he3b883rix5pyo%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clgr11t6d00083b6im5ecqgqt%2522%252C%2522type%2522%253A%2522PROJECT_SETUP%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Findex.ts%2522%252C%2522id%2522%253A%2522cljyh7qo300f03b88d3o1obps%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fpackage.json%2522%252C%2522id%2522%253A%2522cljyha9zu019b3b88uuqkbhx8%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522cljyhasuy01hv3b88cyu78iiy%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522cljyhaswq000dfpjohlxtdnri%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Ftsconfig.json%2522%252C%2522id%2522%253A%2522cljyhcvaj04zp3b88qv2hnkrl%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Findex.test.tsx%2522%252C%2522id%2522%253A%2522cljyhdd0n05he3b883rix5pyo%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fjest.config.js%2522%252C%2522id%2522%253A%2522cljyhffwn060r3b88evn4jirb%2522%252C%2522mode%2522%253A%2522temporary%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D)