Skip to content

Typescript support #51

Description

@atlanteh

Since the UdgerParser class is not exposed, but only a default function that instantiate the class, there's no way to reference it in a typescript project and take advantage of static analysis.
For example:

class MyClass {
  constructor(private _uaParser: UdgerParser) {}
  
  getUserAgentInfo(req: Request) {
    const ua = req.headers['user-agent']
    return this._uaParser.parseUa(ua);
  }
}

Can you please expose the class (and maybe add correct types as well?)

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions