API Reference / @evolu/common / Evolu/Internal / Mutation
Type Alias: Mutation()<S, Kind>
type Mutation<S, Kind> = <TableName>(table, props, options?) => Result<{
id: S[TableName]["id"]["Type"];
},
| ValidMutationSizeError
| MergeObjectTypeErrors<ObjectType<MutationMapping<S[TableName], Kind>>>>;
Defined in: packages/common/src/Evolu/Schema.ts:237
Type Parameters
Type Parameter |
---|
S extends EvoluSchema |
Kind extends MutationKind |
Type Parameters
Type Parameter |
---|
TableName extends keyof S |
Parameters
Parameter | Type |
---|---|
table | TableName |
props | InferInput <ObjectType <MutationMapping <S [TableName ], Kind >>> |
options? | MutationOptions |
Returns
Result
<{
id
: S
[TableName
]["id"
]["Type"
];
},
| ValidMutationSizeError
| MergeObjectTypeErrors
<ObjectType
<MutationMapping
<S
[TableName
], Kind
>>>>