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