Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow NestJS to leverage Generic definitions #972

Closed
shohoney opened this issue Dec 4, 2023 · 2 comments · Fixed by #982
Closed

Allow NestJS to leverage Generic definitions #972

shohoney opened this issue Dec 4, 2023 · 2 comments · Fixed by #982
Labels

Comments

@shohoney
Copy link

shohoney commented Dec 4, 2023

More a question than anything. Is it possible to have nestJs=true not ignore the outputServices parameter? Or, is there a specific option that will give me the portion of genericDefinitions that has the "definition" which looks like

export type SomeServieDefinition = typeof SomeServiceDefintion;

export const SomeServicesDefintition = {
  name: 'SomeService',
  fullName: '....',
  methods: {
    ....
  }
}

We have a utility that we wrote that takes the output encoders/decoders and uses the definition above to adjust the output definitions from proto-loader so that Nest is able to leverage the encoders and decoders from ts-proto. I've tinkered with a lot of the options and I wasn't able get my desired result. I was able to determine that the output I want comes from the genericDefintions option, however.

@stephenh
Copy link
Owner

Hi @shohoney ; apologies for the really late reply, I missed your message in my ~every week or so triage of ts-proto issues...

Setting nestJs=true does it really skip the other options doesn't it...

Yeah, that seems like an easy fix. Are you still looking for this change to be made?

Fwiw I think the NestJS / proto-loader glue you've written would probably be very useful to others that are working on NestJS as well, is that something you could share/potentially contribute?

Thanks!

@stephenh
Copy link
Owner

🎉 This issue has been resolved in version 1.166.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants