josemarluedke / frontile

Component Library for Ember Octane apps
https://frontile.dev
MIT License
55 stars 21 forks source link

template registry for @glint/environment-ember-loose ? #239

Closed mcfiredrill closed 10 months ago

mcfiredrill commented 1 year ago

Does this addon provide types we can import for using with @glint/environment-ember-loose ?

josemarluedke commented 10 months ago

We just released version 0.16.x which moves to addon v2 and adds glint support.

You can import the registries like this:


// <your-app>/types/glint.d.ts
import '@glint/environment-ember-loose';
import '@glint/environment-ember-template-imports';

import type FrontileCore from '@frontile/core/template-registry';
import type FrontileButtons from '@frontile/buttons/template-registry';
import type FrontileForms from '@frontile/forms/template-registry';
import type FrontileChangesetForm from '@frontile/changeset-form/template-registry';
import type FrontileOverlays from '@frontile/overlays/template-registry';
import type FrontileNotifications from '@frontile/notifications/template-registry';

declare module '@glint/environment-ember-loose/registry' {
  export default interface Registry
    extends FrontileCore,
      FrontileButtons,
      FrontileForms,
      FrontileChangesetForm,
      FrontileOverlays,
      FrontileNotifications {
    /* your local loose-mode entries here */
  }
}