How can i share types (typescript) in plugin between admin and server?

I need to share type between admin and server, basically type of api response needs to be shared to admin react application. how can i do this ?

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