Add explicit CRDT edit contracts and structured query values
This commit is contained in:
@@ -108,6 +108,7 @@ export class GenericSourceTypes {
|
||||
return parameter?.kind === "value" && Boolean(parameter.storable);
|
||||
}
|
||||
if (type.kind === "list" || type.kind === "optional") return storable(type.value, depth + 1);
|
||||
if (type.kind === "record") return Object.values(type.fields).every((field) => storable(field, depth + 1));
|
||||
if (type.kind === "alias") {
|
||||
const alias = aliases.get(type.definitionId);
|
||||
if (!alias || alias.parameters.length !== type.arguments.length) return false;
|
||||
@@ -318,6 +319,12 @@ export class GenericSourceTypes {
|
||||
return { kind: "record", fields: Object.fromEntries(fields) };
|
||||
}
|
||||
const name = context.identifier()!.getText();
|
||||
if (name === "change" && context.typeArguments())
|
||||
throw new GenericTypeError(
|
||||
"unsupported-prepared-change",
|
||||
name,
|
||||
"Authored change<T> transport values require LF-19; native edit contracts are available separately",
|
||||
);
|
||||
if (context.ATOM_REF()) return { kind: "object-ref", expectation: this.atom(name) };
|
||||
if (context.INTERFACE_REF())
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user