Set up a tsconfig.json with nodenext as the module mode. { "compilerOptions": { "module": "nodenext", "noEmit": true, "strict": true } }
Add the following code import * as fetch from "node-fetch"; const b = /**/someList.filter(a => a.startsWith("@types"))
At the cursor /**/, type in new Set( import * as fetch from "node-fetch"; const b = new Set(/**/someList.filter(a => a.startsWith("@types"))
Notice that the resolution to node-fetch is now borked.
Complete the parentheses on the other side import * as fetch from "node-fetch"; const b = new Set(someList.filter(a => a.startsWith("@types")))/**/
The resolution to node-fetch is likely still failing. If so, try to type a ;. That may fix it. import * as fetch from "node-fetch"; const b = new Set(someList.filter(a => a.startsWith("@types")));/**/