UNPKG

jsx-view

Version:

Minimal JSX for HTML DOM tightly integrated with RxJS. TypeScript definitions, and attributes can be assigned to observables.

24 lines 533 B
/** internal stack with state field s */ export class St { s; #curr = -1; #stack = new Array(64).fill(undefined); constructor(s) { this.s = s; } push(add) { this.#curr += 1; this.#stack[this.#curr] = add; } pop() { this.#stack[this.#curr] = undefined; this.#curr -= 1; } get() { if (this.#curr < 0) { throw new Error("Unexpected Stack.get"); } return this.#stack[this.#curr]; } } //# sourceMappingURL=stack.js.map