-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
TypeScript Version: 3.4.0-rc
Search Terms: require, intellisense
Typescript does not resolve modules of require expressions as it does in plain js files.
Code
require("s:\\dev\\easy-attach\\")({
eagerExitDebugProxy: true,
port: "preconfigured",
});Expected behavior:
This is what I get in VS Code in plain js files:

Actual behavior:
However, the module is not resolved in ts files:

Probably this is intended and my use case is a very special one.
However, typescripts repository description still says:
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
In this case, typescript has better support for require in js than in ts which is a little bit confusing considering typescript being a superset of javascript.
phiresky, egoist, gbrlsnchs, makcbrain, VanillaSixtySix and 3 more
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript