@evolu/react
Version:
Evolu for React
34 lines • 1.12 kB
TypeScript
export * from "@evolu/common/public";
export declare const
/**
* Create Evolu from the database schema.
*
* Tables with a name prefixed with `_` are local-only, which means they are
* never synced. It's useful for device-specific or temporal data.
*
* @example
* import * as S from "@effect/schema/Schema";
* import * as E from "@evolu/react";
*
* const TodoId = E.id("Todo");
* type TodoId = typeof TodoId.Type;
*
* const TodoTable = E.table({
* id: TodoId,
* title: E.NonEmptyString1000,
* });
* type TodoTable = typeof TodoTable.Type;
*
* const Database = E.database({
* todo: TodoTable,
*
* // Prefix `_` makes the table local-only (it will not sync)
* _todo: TodoTable,
* });
* type Database = typeof Database.Type;
*
* const evolu = E.createEvolu(Database);
*/
createEvolu: <T extends import("@evolu/common").EvoluSchema, I>(schema: import("@effect/schema/Schema").Schema<T, I>, config?: Partial<import("@evolu/common").EvoluConfig<T>>) => import("@evolu/common").Evolu<T>;
export * from "@evolu/common-react";
//# sourceMappingURL=index.d.ts.map