danvk / source-map-explorer

Analyze and debug space usage through source maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File type clashes with TypeScript DOM types

davidgilbertson opened this issue · comments

Description
In your types.d.ts file you have

export type File = string | Buffer;

...which makes File globally visible. But this is also a type exported by the base DOM types of TypeScript, describing a File (https://developer.mozilla.org/en-US/docs/Web/API/File).

It's less often used, but the same effect as exporting a global type Array.

For the most part it doesn't cause any real problems, but it introduces ambiguity, and in my IDE (IntelliJ), results in a pesky message
image
which in turn is resulting in me uninstalling source-map-explorer.

Feel free to close, but if you wanted to rename your File to something not already used, that'd be great.