In my Location.ts
file, there is a declaration:
class Location {
// ...
}
When I run tsc
, it produces the following error message:
1 class Location {
../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts:9249:11 9249 interface Location { 'Location' was also declared here.
How can I resolve this issue?
Simply changing class Location
to export class Location
seems to fix it, but I am unsure why that is necessary.
(Regarding my project requirements, I have included dom in my tsconfig.json
file using: "lib": ["es6", "dom"]
)