class NodeList {
    last() {
        const len = this.n.length;
        if (len > 0) {
            return this.n[len - 1];
        }
        return undefined;
    }
    has() {
        return this.n.length > 0;
    }
    flush() {
        return this.n.length ? this.n.pop() : undefined;
    }
    push(value) {
        this.n.push(value);
    }
    ref() {
        return this.n;
    }
    constructor(){
        this.n = [];
    }
}
export { NodeList };
export default NodeList;
