Getting started
Installation
npm install @rjdellecese/confectyarn add @rjdellecese/confectpnpm add @rjdellecese/confectexactOptionalPropertyTypes
exactOptionalPropertyTypesNormally when using the Effect schema library, it's recommended to set exactOptionalPropertyTypes in your tsconfig.json to true. However, this configuration is not supported by convex-js at the moment, so to use Confect, you must set it to false instead.
To understand the implications of this, see this explanation in the Effect docs.
Usage
1. Define your database schema
https://github.com/rjdellecese/confect/blob/main/example/convex/schema.ts
2. Generate your Convex function constructors and types.
https://github.com/rjdellecese/confect/blob/main/example/convex/confect.ts
3. Write some Convex functions!
https://github.com/rjdellecese/confect/blob/main/example/convex/functions.ts
Example project
The above files are pulled from a real example project. Check it out here.
Last updated