mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
More improvements
This commit is contained in:
parent
8388c93e62
commit
84165d21f4
10 changed files with 465 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue