Skip to content

File type clashes with TypeScript DOM types #202

Description

@davidgilbertson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions