At line 26 in my typescript file, the code snippet below shows an enum definition:
export enum ItemType {
Case = 'Case',
Study = 'Study',
Project = 'Project',
Item = 'Item',
}
I am currently using Visual Studio Code as my IDE. Linting flags an error stating
'ItemType' is already declared in the upper scope on line 26 column 13.eslint(no-shadow)
The only other usage of ItemType
in the file is within an interface definition as shown below:
export interface Item {
// other fields here
readonly type: ItemType;
}
No other part of my project defines anything called 'ItemType', which adds to the confusion of this error message. Can you help me understand why this error occurs and how I can resolve it?