You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running glint produces lots of glint/typescript errors that I don't completely understand.
glint output
> glint
app/templates/application.hbs:1:3 - error TS2769: The given value does not appear to be usable as a component, modifier or helper.
No overload matches this call.
Overload 1 of 3, '(item: DirectInvokable): AnyFunction', gave the following error.
Argument of type 'typeof PageTitle' is not assignable to parameter of type 'DirectInvokable'.
Property '[InvokeDirect]' is missing in type 'typeof PageTitle' but required in type 'DirectInvokable'.
Overload 2 of 3, '(item: (abstract new (owner: Owner) => InvokableInstance) | null | undefined): (...args: any) => any', gave the following error.
Argument of type 'typeof PageTitle' is not assignable to parameter of type 'abstract new (owner: Owner) => InvokableInstance'.
Types of construct signatures are incompatible.
Type 'new (owner: Owner) => PageTitle' is not assignable to type 'abstract new (owner: Owner) => InvokableInstance'.
Property '[Invoke]' is missing in type 'PageTitle' but required in type 'InvokableInstance'.
Overload 3 of 3, '(item: ((...params: any) => any) | null | undefined): (...params: any) => any', gave the following error.
Argument of type 'typeof PageTitle' is not assignable to parameter of type '(...params: any) => any'.
Type 'typeof PageTitle' provides no match for the signature '(...params: any): any'.
1 {{page-title "MyApp"}}
~~~~~~~~~~
node_modules/.pnpm/@glint+template@1.2.1/node_modules/@glint/template/-private/integration.d.ts:19:70
19 export type DirectInvokable<T extends AnyFunction = AnyFunction> = { [InvokeDirect]: T };
~~~~~~~~~~~~~~
'[InvokeDirect]' is declared here.
node_modules/.pnpm/@glint+template@1.2.1/node_modules/@glint/template/-private/integration.d.ts:22:72
22 export type InvokableInstance<T extends AnyFunction = AnyFunction> = { [Invoke]: T };
~~~~~~~~
'[Invoke]' is declared here.
node_modules/.pnpm/ember-page-title@8.2.0_ember-source@5.4.0/node_modules/ember-page-title/declarations/helpers/page-title.d.ts:30:40 - error TS2689: Cannot extend an interface 'Helper'. Did you mean 'implements'?
30 export default class PageTitle extends Helper<Signature> {
~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/component/helper.d.ts:7:10 - error TS2307: Cannot find module '@ember/-internals/glimmer' or its corresponding type declarations.
7 } from '@ember/-internals/glimmer';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/owner/index.d.ts:33:21 - error TS2307: Cannot find module '@ember/-internals/owner' or its corresponding type declarations.
33 import Owner from '@ember/-internals/owner';
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/owner/index.d.ts:88:10 - error TS2307: Cannot find module '@ember/-internals/owner' or its corresponding type declarations.
88 } from '@ember/-internals/owner';
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/owner-ext.d.ts:5:31 - error TS2307: Cannot find module '@ember/routing/location' or its corresponding type declarations.
5 import type { Registry } from '@ember/routing/location';
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:7:54 - error TS2307: Cannot find module '@ember/routing/-internals' or its corresponding type declarations.
7 import { RouteInfo, RouteInfoWithAttributes } from '@ember/routing/-internals';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:8:48 - error TS2307: Cannot find module '@ember/routing/lib/utils' or its corresponding type declarations.
8 import type { RouteArgs, RouteOptions } from '@ember/routing/lib/utils';
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:48:26 - error TS2307: Cannot find module '@ember/-internals/owner' or its corresponding type declarations.
48 (new (owner?: import('@ember/-internals/owner').default | undefined) => Service) &
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:49:5 - error TS2707: Generic type 'Mixin<T, Base>' requires between 1 and 2 type arguments.
49 import('@ember/object/mixin').default;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:474:32 - error TS2536: Type '"currentRouteName"' cannot be used to index type 'this["_router"]'.
474 readonly currentRouteName: this['_router']['currentRouteName'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:501:26 - error TS2536: Type '"currentURL"' cannot be used to index type 'this["_router"]'.
501 readonly currentURL: this['_router']['currentURL'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/routing/router-service.d.ts:595:28 - error TS2536: Type '"currentRoute"' cannot be used to index type 'this["_router"]'.
595 readonly currentRoute: this['_router']['currentRoute'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/service/index.d.ts:2:35 - error TS2307: Cannot find module '@ember/object/-internals' or its corresponding type declarations.
2 import { FrameworkObject } from '@ember/object/-internals';
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/service/index.d.ts:3:71 - error TS2307: Cannot find module '@ember/-internals/metal' or its corresponding type declarations.
3 import type { DecoratorPropertyDescriptor, ElementDescriptor } from '@ember/-internals/metal';
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/ember-source@5.4.0_@babel+core@7.23.2_@glimmer+component@1.1.2_@glint+template@1.2.1_rsvp@4.8.5_webpack@5.89.0/node_modules/ember-source/types/stable/@ember/service/owner-ext.d.ts:9:5 - error TS2717: Subsequent property declarations must have the same type. Property 'service' must be of type 'Registry', but here has type 'Registry'.
9 service: Registry;
~~~~~~~
node_modules/.pnpm/@types+ember__service@4.0.6_@babel+core@7.23.2/node_modules/@types/ember__service/index.d.ts:29:9
29 service: Registry;
~~~~~~~
'service' was also declared here.
ELIFECYCLE Command failed with exit code 1.
This is a new Ember app that I added ember-template-imports to. The package.json is:
I'm trying to use the types provided by v8.2.0 in a brand new Ember app.
Here's my starting point, adding the
page-title
registry entry manually:With the above, glint runs with no errors.
Now, when I update the file to use the real types, like this:
Running glint produces lots of glint/typescript errors that I don't completely understand.
glint output
This is a new Ember app that I added ember-template-imports to. The package.json is:
Is there a dependency or upgrade I'm missing? Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: