IntelliSense error in H3Event
See original GitHub issueEnvironment
“nitropack”: “0.4.24”
Reproduction
https://stackblitz.com/edit/github-xukg4p-mpwena?file=routes%2Findex.ts,package.json
Describe the bug
export default defineEventHandler((event) => {
event.res.statusCode = 204;
event.res.end();
});
IntelliSense error:
Property 'statusCode' does not exist on type 'ServerResponse'.(2339)
Seems like the error is in:
// node_modules/h3/dist/index.d.ts:1
import http, { OutgoingMessage } from 'http';
should be this:
import * as http from 'http';
import { OutgoingMessage } from 'http';
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
intellisense errors when using visual studio force include
I force include the windows.h file, and the intellisense can work as normal. My visual studio is 16.9.4. enter image description here.
Read more >Add VS IntelliSense Error on interface containing function with ...
Add Visual Studio IntelliSense Error on HTMLElement interface containing a function with the same name as an variable on a derived Element ...
Read more >IntelliSense incorrect error for constructor is inaccessible
Purpose would be having a pure virtual class with a constructor with arguments. Could have that be a public constructor since it can't...
Read more >Fixing Visual Studio Intellisense Errors - Rick Strahl's Web Log
I ran into a problem in one of my applications where Visual Studio was showing errors that were clearly not actual errors.
Read more >Configure a C++ project for IntelliSense - Microsoft Learn
Tag parser errors appear in the Error List window. Validate project settings with diagnostic logging. To check whether IntelliSense compiler is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One possible solution is to enable
esModuleInterop
. For example, on developer’s side:Refs:
Updated stackblitz with latest h3 and types/node still not working… Any ideas @danielroe ?