Skip to content

Same code got error in js file but no error in ts file #31312

Closed

Description

  • VSCode Version: 1.31.1
  • OS Version: win10 family

Steps to Reproduce:

test.js

import axios from 'axios' // Import declaration conflicts with local declaration of 'axios'.ts(2440)
axios.defaults.timeout = 22

In js file, the second line causes an error showing on first line.
But if this two lines are in ts file (change file suffix to ts), there is no error.

Does this issue occur when all extensions are disabled?: Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issuecheckJsRelates to checking JavaScript using TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions