Closed jdforsythe closed 3 years ago
Thanks for pointing that out. A PR would be appreciated!
@ethanent PR submitted https://github.com/ethanent/phin/pull/65
I kept the generics but explicitly made the T
extend IOptionsBase
and updated the data
property of IWithData
to be compatible with what Centra accepts.
The type used for POST requests is
IWithData<phin.IOptions>
but theIWithData
is not exported intypes.d.ts
so there's no way to construct a typed options object without making a custom type.Also, there's a note in the types about using the generics to make JSON/Form posting mutually exclusive, but wouldn't this work just as well?