In a typescript file at line 26 I have the following code:
export enum ItemType {
Case = 'Case',
Study = 'Study',
Project = 'Project',
Item = 'Item',
}
I am using Visual Studio Code as the IDE. The linting gives me an error 'ItemType' is already declared in the upper scope on line 26 column 13.eslint(no-shadow)
The only place where ItemType
is referenced is below in the same file in an interface definition:
export interface Item {
// other fields here
readonly type: ItemType;
}
Nowhere else in my project do I have a definition of anything called 'ItemType'. This is what makes understanding this error difficult. Why do I get this error, and how do I fix my code?