Implement reusable interface conformance rules
This commit is contained in:
@@ -19,9 +19,9 @@ const compile = (policy = `crdt(${content})`, binding = "edit") =>
|
||||
`
|
||||
workspace Comments id "w" revision "w@1" commit "${"a".repeat(40)}" {
|
||||
import interface Comment;
|
||||
atom Comment id "comment";
|
||||
conform Comment as Comment id "owner:comment" {
|
||||
private state Content id "content" on Comment : ${content} policy ${policy};
|
||||
atom CommentAtom id "comment";
|
||||
conform CommentAtom as Comment id "owner:comment" {
|
||||
private state Content id "content" on CommentAtom : ${content} policy ${policy};
|
||||
initialize { content to state Content; };
|
||||
bind content.get to state Content.read;
|
||||
bind content.edit to state Content.${binding};
|
||||
|
||||
Reference in New Issue
Block a user