Replies: 1 comment
-
Hi, sure we're very open for any contributions, please open a PR if you want |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Wanted to see if there were plans for improved TS support in 2.x, namely a re-write to TS. We have a use case where we'd like to utilize a type for named constants, for example, and having more built-out TS support would make this easier.
We went down the path of updating the
exports
entries inpackage.json
to handle multiple module systems, but stopped short because we still don't have access to enum types. (Related issue: #692)https://github.com/faisalman/ua-parser-js/compare/master...kalyons11:ua-parser-js:fix-module-typings?expand=1
if a TS re-write is a long ways off then we could contribute redundant typings for
enums
that have a union over all of the object values in each frozen object. The downside is that adding a new field to an enum would require a change in 2 places - 1 in the module file and 1 in the type declaration.Beta Was this translation helpful? Give feedback.
All reactions