Closed tcjr closed 9 months ago
I think https://github.com/ember-cli/ember-page-title/pull/283 fixes this. A new release should be out soon.
Edit: It's already out as part of 8.2.1
Edit: It's already out as part of 8.2.1
Updated to 8.2.1 and it works perfectly. Thank you!
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
``` > 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 DirectInvokableThis 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.