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
go to routes/index.ts, and typescript will throw an error: Cannot find name 'eventHandler'. and type hints are not working as designed.
Describe the bug
the generated tsconfig.json file in .nitro/types is missing "include path" of relative path of the nitro.config.buildDir to the nitro.config.rootDir/srcDir ("../../**/*" when using basic config setup), causing typescript unable to grab all global types defined in .nitro/types/nitro.d.ts.
adding relative path of the nitro.config.buildDir to the nitro.config.rootDir/srcDir to tsConfig.include array in nitro\src\build.ts should fix this issue.
…itrojs#204)
the generated tsconfig.json file in .nitro/types is missing "include path" of "../../**/*", causing typescript unable to grab all global types defined in .nitro/types/nitro.d.ts. adding "../../**/*" to tsConfig.include array in nitro\src\build.ts should fix this issue.
Environment
Nitro: Latest
Node: v16.13.0
Reproduction
clone and run pnpm dev: https://github.com/didavid61202/nitro-app
go to
routes/index.ts
, and typescript will throw an error:Cannot find name 'eventHandler'.
and type hints are not working as designed.Describe the bug
the generated
tsconfig.json
file in.nitro/types
is missing "include path" of relative path of the nitro.config.buildDir to the nitro.config.rootDir/srcDir ("../../**/*"
when using basic config setup), causing typescript unable to grab all global types defined in.nitro/types/nitro.d.ts
.adding relative path of the nitro.config.buildDir to the nitro.config.rootDir/srcDir to
tsConfig.include
array innitro\src\build.ts
should fix this issue.can be fix by #205
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: