More improvements

This commit is contained in:
Ayaz Hafiz 2023-07-18 11:24:50 -05:00
parent 8388c93e62
commit 84165d21f4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
10 changed files with 465 additions and 35 deletions

View file

@ -58,7 +58,7 @@ export type ChangeEvent =
export type Change = ChangeEvent | RollbackChange;
export class Subs {
export class Subs implements QuerySubs {
#map: Map<Variable, VarType>;
private constructor(map: Map<Variable, VarType>) {
@ -165,9 +165,12 @@ export class Subs {
const SnapshotSymbol = Symbol("Snapshot");
export interface SubsSnapshot {
export interface QuerySubs {
get(variable: Variable): VarType | undefined;
get_root(variable: Variable): TypeDescriptor | undefined;
get_root_key(variable: Variable): Variable;
}
export interface SubsSnapshot extends QuerySubs {
__snapshot__: typeof SnapshotSymbol;
}