Skip to content

No file ending when adding import #60451

Open

Description

  • vscode at commit f0a0037
  • open src/vs/workbench/contrib/chat/browser/chatEditorOverlay.ts
  • on line 42 write this._editor.getOption(EditorOption) and make sure to use auto complete with import for EditorOption
  • 🐛 the import will be without .js

excerpt from the logs

Info 10477[09:55:25.163] response:
    {"seq":0,"type":"response","command":"updateOpen","request_seq":303,"success":true,"body":true}
Info 10478[09:55:25.214] request:
    {
      "seq": 304,
      "type": "request",
      "command": "updateOpen",
      "arguments": {
        "changedFiles": [
          {
            "fileName": "/Users/jrieken/Code/vscode/src/vs/workbench/contrib/chat/browser/chatEditorOverlay.ts",
            "textChanges": [
              {
                "newText": "import { EditorOption } from '../../../../editor/common/config/editorOptions';\n",
                "start": {
                  "line": 21,
                  "offset": 1
                },
                "end": {
                  "line": 21,
                  "offset": 1
                }
              }
            ]
          }
        ],
        "closedFiles": [],
        "openFiles": []
      }
    }

tsserver.log

Activity

  1. removed their assignment
    on Nov 7, 2024
  2. RyanCavanaugh commented on Nov 15, 2024

    @RyanCavanaugh
    Member

    This is the intended behavior unless you have set the importModuleSpecifierEnding preference to js, because the controlling tsconfig here says moduleResolution: node, which has never needed file extensions (and which were idiomatically not included in that era).

    You can either set the preference, or update the module resolution setting to nodenext, or both. I've sent a PR for the former

  3. added
    QuestionAn issue which isn't directly actionable in code
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on Nov 15, 2024
  4. typescript-bot commented on Nov 18, 2024

    @typescript-bot
    Contributor

    This issue has been marked as "Question" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

  5. added
    Needs InvestigationThis issue needs a team member to investigate its status.
    and removed
    QuestionAn issue which isn't directly actionable in code
    on Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Needs InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions