How can i get TS types from functions defined in services

Hi guys

I am currently building a project using TypeScript. However, if I generate an API using the generate command as shown in image 1 and define a function inside the service as shown in image 2, I can’t seem to access the typings of the function from the controller. Everything is defined as any. Is this by design, or am I doing something wrong?

I would be very grateful if someone could help me with this issue.

I have tested this with the current project using the stable version of Strapi 4 and the dev version 5, and I am facing the same problem regardless of the version.

This topic has been created from a Discord post (1265798888611250198) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord