microsoft / microsoft/TypeScript

The 'Convert to ES6 Module' in the TS language support has an aftereffect.

Open
#28,358 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Issue Type: Bug

I chose the IntelliSense 'Convert to ES6 Module' at the import statement, then I generated it, but failed. If I don't convert, it runs fine. I think the convert of IntelliSense should be equivalent, at least the result should not cause a error.

var commandExists = require("command-exists").sync
console.log(commandExists('C://MinGW//bin//g++.exe'))

VS Code version: Code 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 3.92GB (0.59GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the IntelliSense “Convert to ES6 Module” action with the provided command-exists example and compare the generated module with the working require form. Investigate the TypeScript language-support conversion path and capture the resulting error; done means the converted code behaves equivalently or reports a clear limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.