microsoft / microsoft/TypeScript

index.d.ts is not a module

Open
#42,179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Investigation
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Bug Report

🔎 Search Terms
  • index.d.ts
  • coc-tsserver
  • module
🕗 Version & Regression Information

typescript@4.2.0-dev.20210102

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
⏯ Playground Link

Detailed Description
Reproduce Steps

💻 Code

https://github.com/fannheyward/coc-rust-analyzer/blob/master/src/index.ts

🙁 Actual behavior

https://user-images.githubusercontent.com/33961674/103449549-06f80180-4caa-11eb-9009-35edba28fa7d.gif
The diagnostic is wrong, it reports index.d.ts is not a module while the file was just there.

🙂 Expected behavior

No wrong diagnostics, continue working

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 diagnostic using the reproduction GIF and the example in src/index.ts, then review the linked coc-tsserver issue for the surrounding context. Trace how index.d.ts is treated and verify that the reported “is not a module” diagnostic no longer appears while work continues normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.