Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript gets confused when renaming by only changing filename case of imported file on Windows #60756

Open
M393 opened this issue Dec 13, 2024 · 0 comments
Labels
Bug A bug in TypeScript
Milestone

Comments

@M393
Copy link

M393 commented Dec 13, 2024

🔎 Search Terms

windows rename already included

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

file src/vector.js

export default class Vector {}

file test/vector.test.js

import Vector from '../src/vector.js'
new Vector();

now rename the file

mv src/vector.js src/Vector.js

and update the file test/vector.test.js

import '../src/Vector.js'
new Vector();

🙁 Actual behavior

There is an error message:
Image

🙂 Expected behavior

No error message, as the imported file name matches the actual file name.

Additional information about the issue

tsconfig.json

{
    "compilerOptions": {
      "target": "ES2017",
      "module": "commonjs",
      "lib": ["es2017", "dom", "DOM.Iterable"],
      "allowJs": true,
      "checkJs": true,
      "skipLibCheck": true,
      "declaration": true,
      "noEmit": true,
      "strict": true,
      "baseUrl": ".",
      "typeRoots": [
        "./node_modules/@types",
      ],
      "esModuleInterop": true
    },
    "include": [
      "src/**/*.js",
      "test/**/*.js",
    ]
}
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Dec 13, 2024
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants