From d85b49b950106d0954e4636226a308be87ef3d1d Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Mon, 19 Feb 2024 16:05:17 +0100 Subject: [PATCH] chore: Consumed the template registry from ember-page-title --- docs-app/types/docs-app/index.d.ts | 10 +++------- test-app/types/test-app/index.d.ts | 11 ++++------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/docs-app/types/docs-app/index.d.ts b/docs-app/types/docs-app/index.d.ts index 5f8c1c98..4a60f5ad 100644 --- a/docs-app/types/docs-app/index.d.ts +++ b/docs-app/types/docs-app/index.d.ts @@ -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'; @@ -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; } } diff --git a/test-app/types/test-app/index.d.ts b/test-app/types/test-app/index.d.ts index 9da88b53..02c7576a 100644 --- a/test-app/types/test-app/index.d.ts +++ b/test-app/types/test-app/index.d.ts @@ -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; } }