danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.83k stars 101 forks source link

File type clashes with TypeScript DOM types #202

Open davidgilbertson opened 3 years ago

davidgilbertson commented 3 years ago

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.