Closed dblock closed 2 months ago
@nhtruong What's the verdict on this one? Are we leaving it as is?
JetBrains can still infer the type using require
in both ts and js files.
Projects that use TS will most likely be using more modern JS syntax with import
anyway.
I think we can close it as it's a VS Code issue for a very niche use case.
What is the bug?
Coming from https://github.com/opensearch-project/opensearch-js/issues/803#issuecomment-2286662634. VSCode resolves types when
import
, but notrequire
.How can one reproduce the bug?
Check out https://github.com/dblock/opensearch-node-client-demo. Toggle between
import
andrequire
in the demo.What is the expected behavior?
VSCode should be resolving types all the time.
What is your host/environment?
Visual Studio Code w/ TypeScript.
Do you have any screenshots?
TODO
Do you have any additional context?
Seems to work with JetBrains.