Skip to content

Commit

Permalink
chore: Consumed the template registry from ember-page-title
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 committed Feb 19, 2024
1 parent d04020d commit d85b49b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
10 changes: 3 additions & 7 deletions docs-app/types/docs-app/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import '@glint/environment-ember-template-imports';
import 'ember-source/types';
import 'ember-source/types/preview';

import type { ComponentLike, HelperLike } from '@glint/template';
import type { ComponentLike } from '@glint/template';
import type EmberContainerQueryRegistry from 'ember-container-query/template-registry';
import type EmberPageTitleRegistry from 'ember-page-title/template-registry';
import type EmberSvgJarRegistry from 'ember-svg-jar/template-registry';
import type EmberTruthHelpersRegistry from 'ember-truth-helpers/template-registry';
import type EmbroiderCssModulesRegistry from 'embroider-css-modules/template-registry';
Expand All @@ -18,20 +19,15 @@ type NavigationNarratorComponent = ComponentLike<{
};
}>;

type PageTitleHelper = HelperLike<{
Args: { Positional: [title: string] };
Return: void;
}>;

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry
extends EmberContainerQueryRegistry,
EmberPageTitleRegistry,
EmberSvgJarRegistry,
EmberTruthHelpersRegistry,
EmbroiderCssModulesRegistry {
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
NavigationNarrator: NavigationNarratorComponent;
'page-title': PageTitleHelper;
}
}
11 changes: 4 additions & 7 deletions test-app/types/test-app/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import 'ember-source/types';
import 'ember-source/types/preview';

import type EmberContainerQueryRegistry from 'ember-container-query/template-registry';

type PageTitleHelper = HelperLike<{
Args: { Positional: [title: string] };
Return: void;
}>;
import type EmberPageTitleRegistry from 'ember-page-title/template-registry';

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry extends EmberContainerQueryRegistry {
export default interface Registry
extends EmberContainerQueryRegistry,
EmberPageTitleRegistry {
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
'page-title': PageTitleHelper;
}
}

0 comments on commit d85b49b

Please sign in to comment.