Sha256: d52c0d2e8adb1e90a95cea4449789190ac3c5e9e28b2bf6460580f5c8827c4e5

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

import { templateFactory } from '@glimmer/opcode-compiler';
import { getOwner } from 'ember-owner';
export default function template(json) {
    return new FactoryWrapper(templateFactory(json));
}
class FactoryWrapper {
    constructor(factory) {
        this.factory = factory;
        this.id = factory.id;
        this.meta = factory.meta;
    }
    create(injections) {
        const owner = getOwner(injections);
        return this.factory.create(injections.compiler, { owner });
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
discourse-ember-source-3.5.1.1 dist/es/ember-glimmer/lib/template.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-glimmer/lib/template.js