Reputation: 141452
We have the following class definition:
export class RegistrationForm {
}
The Visual Studio Code errors and warnings panel says:
[ts] Duplicate identifier 'RegistrationForm'. src/registration-form.ts(1,14)
[ts] Duplicate identifier 'RegistrationForm'. src/registration-form.ts(2,15)
Here is the screenshot:
We have done a Find in Files and found no other declarations of RegistrationForm
.
Why is TypeScript complaining about a duplicate identifier that doesn't exist? How do we resolve this?
Upvotes: 0
Views: 100
Reputation: 276239
Why is TypeScript complaining about a duplicate identifier that doesn't exist? How do we resolve this?
Suspect its an issue in tssserver
. You probably have two tsconfig.json
files and this file is somehow (due to a failed path uniqueness check) getting included twice.
To be sure its not a compiler error and just an IDE error you can run tsc
on the command line or give another IDE a go (e.g. http://alm.tools/ 🌹)
Upvotes: 1