Exposing ConvexAPI without using React
Separately, the type
ConvexAPI
https://docs.convex.dev/generated-api/react#convexapi that lives in _generated/react.d.ts
seems like it's not React-specific, and could perhaps be nice to extract for the use of other clients2 Replies
Totally, we could split it out into a react + @types/react you could use this now in the non-React client you're writing, but I've filed this request!
For now you could try
_generated/api.d.ts
and _generated/react.d.ts
. If you don't mind a devDependency on import type { ConvexAPI } from convex/_generated/react
, but yeah this will require the users of your client to install @types/react
as a dev dependency for no other reason.That's no problem for me at the moment 🙂