Closed felixfbecker closed 7 months ago
You can find the input fields from the README, but the output fields are not documented. You pretty much need to try and see what you get from each function. I don't use TS myself so I don't have any plans to include typings in the repo, but if you can generate useful typings, you could add these to the community-managed type repo.
Is your feature request related to a problem? Please describe.
Currently, it's hard to know what properties are available on the result object and there is no type safety when using TypeScript.
Describe the solution you'd like
I'd love to have TypeScript types either shipped with the package or published under
@types/
Describe alternatives you've considered
Typing everything as
any
:)Additional context
I tried writing types with some AI help from the example JSON: https://gist.githubusercontent.com/andris9/6514b5e7c59154a5b08636f99052ce37/raw/a6fa78c400fd7068de502e878f0da1eb9334cd7b/mailauth.json
It seems that is currently the only documentation of what properties are available? Unfortunately I don't know nearly enough about the internals of the library and all the email specs to know which properties should be optional/required etc so some help would be greatly appreciated — even if in the form of written API documentation (list of fields and types) or JSDoc. It would also be nice to add descriptions for the fields. I'd be happy to help writing types from that.
Here's what I got with AI help (which unfortunately still has some type errors with the result JSON):