I suggest you ...

Generate ES6 import statements for TypeScript modules instead of reference tags

Currently, when a '.ts' (TypeScript) file is drag-and-dropped from the Solution Explorer into an open '.ts' file, a reference is automatically inserted at the top of the file:

/// <reference path="../playback/key.ts" />

This is fine when a project is being developed using internal modules (namespaces), but is virtually useless when external modules (modules) are used instead. It would be much more helpful if the following was generated instead:

import {} from "../playback/key";

This could be either selectable, or auto-detected: if a '.ts' file has a top-level import or export statement, it is an external module, and other '.ts' files dragged in should generate the ES6 import syntax instead of a reference tag, which is useless.

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    John WhiteJohn White shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base