You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The introduction of checking that actions are async functions seems to be quite inaccurate. As seen in the example above, both the exports are async functions, yet the TS plugin complains.
I'd expect both these exports to be valid. Afterall, they both do work runtime:
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: 1.22.19
pnpm: 8.13.1
Relevant Packages:
next: 14.2.0-canary.44 // Latest available version is detected (14.2.0-canary.44).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.4.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript (plugin, built-in types)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The rule testing for this was introduced in 14.2.0-canary.43 by this PR #63667
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/juliusmarminge/next-ts-plugin-async-serveraction
To Reproduce
Run
npm i
, then openapp/_action.ts
. See error:Current vs. Expected behavior
The introduction of checking that actions are async functions seems to be quite inaccurate. As seen in the example above, both the exports are async functions, yet the TS plugin complains.
I'd expect both these exports to be valid. Afterall, they both do work runtime:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 8 Binaries: Node: 20.10.0 npm: 10.2.3 Yarn: 1.22.19 pnpm: 8.13.1 Relevant Packages: next: 14.2.0-canary.44 // Latest available version is detected (14.2.0-canary.44). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript (plugin, built-in types)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The rule testing for this was introduced in
14.2.0-canary.43
by this PR #63667The text was updated successfully, but these errors were encountered: