:wave: feature question/request from one of our en...
# general
b
👋 feature question/request from one of our engineers: Could Pact generate TypeScript bindings automatically?
y
I have seen a package attempting it the other way round https://github.com/HLTech/pact-gen-ts
This project aims to create a package that can generate pact files only from TypeScript definitions (without the necessity of writing separated tests with using pact-js package).
but haven't used this yet, so cannot comment on its usefulness. On Pact -> TS Bindings, how do you mean? We use TS interfaces for say a Product interface and we use those interfaces in the pact interaction builder, so we get intellisense typing.
But if you have created a pact file you already have a client so I'm not sure how useful that would be?
Yep the Pact file would come after the interaction with the client, so it's a bit of a weird trip, you need to build up your req/res in the pact interaction, and make it in your client code, so you should have an interface. You can generate types/clients from your providers spec (oas) with tools I've seen in the wild
b
I guess it might make more sense from a BDC perspective, but there are probably other tools for that already 🤔