blob: 0f3777af6d7905f587db9b5c693abf21eafcfbde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { Doc } from "./Doc";
export const OnUpdate = Symbol("OnUpdate");
export const Parent = Symbol("Parent");
export const Copy = Symbol("Copy");
export abstract class ObjectField {
protected [OnUpdate]?: (diff?: any) => void;
private [Parent]?: Doc;
abstract [Copy](): ObjectField;
}
export namespace ObjectField {
export function MakeCopy<T extends ObjectField>(field: T) {
return field[Copy]();
}
}
|