Skip to content

Commit

Permalink
feat: new O(1) context api
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo79 committed Mar 25, 2024
1 parent a6ff1c3 commit 6a61bad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/objects/context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Owner } from "~/objects/owner.ts";
import { Contexts } from "~/types.ts";

export class Context extends Owner {
contexts: Contexts;

constructor(contexts: Contexts) {
super();

this.contexts = { ...this.parentScope?.contexts, ...contexts };
}
}

0 comments on commit 6a61bad

Please sign in to comment.