How to use the @glimmer/wire-format.Ops.Block function in @glimmer/wire-format

To help you get started, we’ve selected a few @glimmer/wire-format examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glimmerjs / glimmer-vm / packages / @glimmer / compiler / lib / javascript-compiler.ts View on Github external
block(path: Path, template: number, inverse: number) {
    let params = this.popValue();
    let hash = this.popValue();

    let blocks = this.template.block.blocks;
    assert(typeof template !== 'number' || blocks[template] !== null, 'missing block in the compiler');
    assert(typeof inverse !== 'number' || blocks[inverse] !== null, 'missing block in the compiler');

    this.push([Ops.Block, path, params, hash, blocks[template], blocks[inverse]]);
  }