-
-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Labels
feature 🚀Feature request.Feature request.important 📌This issue is important and will be addressed when capacity allows.This issue is important and will be addressed when capacity allows.
Description
Description
First mention in #3132. My resolvers are getting quite large. I would to split them out of my openapi-ts.config.ts file. However, I cannot do this without losing type safety:
// Not type checked anymore!
// Type was: (ctx: NumberResolverContext$1) => PipeResult | undefined
// Type is now: (ctx: any) => any
export const myNumberResolver = function number(ctx) {
...
}I would like to be able to provide type info like I can for transformers:
// Nice and easy, I get to reuse TypeTransformer
// Still type checked for correctness
export const myTransformer: TypeTransformer = ({ schema }) => {
...
}This can be marked enhancement, I wanted to be able to link the stackblitz reproducer but couldn't when I used the enhancement template.
Reproducible example or configuration
https://stackblitz.com/edit/ttamttam-heyapi-resolver-imports
OpenAPI specification (optional)
No response
System information (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature 🚀Feature request.Feature request.important 📌This issue is important and will be addressed when capacity allows.This issue is important and will be addressed when capacity allows.