Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File type clashes with TypeScript DOM types #202

Open
davidgilbertson opened this issue Mar 17, 2021 · 0 comments
Open

File type clashes with TypeScript DOM types #202

davidgilbertson opened this issue Mar 17, 2021 · 0 comments

Comments

@davidgilbertson
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant