Skip to content

Typescript file should have union of string literal types, not just generic string types #551

@neaumusic

Description

@neaumusic

The types via node_modules/bowser/index.d.ts aren't extremely useful

Most variables are just string rather than explaining what the actual values could be (eg 'MacOS' | 'Windows' or 'macos' | 'windows')

I believe the source code probably has explicit values for these, and that the types could be defined better:

  const BROWSER_MAP: Record<string, string>;
  const ENGINE_MAP: Record<string, string>;
  const OS_MAP: Record<string, string>;
  const PLATFORMS_MAP: Record<string, string>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions