emberjs/ember-test-helpers

Missing types for @glimmer/interfaces

ef4 opened this issue · 3 comments

ef4 commented

Upgrading from 2.8.1 to 2.9.1 introduced a type error.

node_modules/@ember/test-helpers/public-types/@ember/test-helpers/setup-rendering-context.d.ts:4:40 - error TS2307: Cannot find module '@glimmer/interfaces' or its corresponding type declarations.

4 import type { ComponentInstance } from '@glimmer/interfaces';
                                         ~~~~~~~~~~~~~~~~~~~~~

Should @glimmer/interfaces be a peerDep? Maybe optional peerDep, since only typescript users would care?

Facing error too

../node_modules/@ember/test-helpers/public-types/@ember/test-helpers/setup-rendering-context.d.ts(4,15): error TS2305: Module '"@glimmer/interfaces"' has no exported member 'ComponentInstance'.
../node_modules/@glimmer/reference/dist/types/lib/validators.d.ts(79,52): error TS2422: A class can only implement an object type or intersection of object types with statically known members.
../node_modules/@glimmer/runtime/dist/types/lib/component/curried-component.d.ts(6,87): error TS2677: A type predicate's type must be assignable to its parameter's type.
  Type 'CurriedComponentDefinition' is not assignable to type 'Maybe<Dict<unknown>>'.
    Type 'CurriedComponentDefinition' is not assignable to type 'Dict<unknown>'.
      Index signature for type 'string' is missing in type 'CurriedComponentDefinition'.
../node_modules/@glimmer/util/dist/types/lib/destroy.d.ts(3,69): error TS2677: A type predicate's type must be assignable to its parameter's type.
  Type 'SymbolDestroyable' is not assignable to type 'Maybe<Dict<unknown>>'.
    Type 'SymbolDestroyable' is not assignable to type 'Dict<unknown>'.
      Index signature for type 'string' is missing in type 'SymbolDestroyable'.
../node_modules/@types/ember__test-helpers/index.d.ts(56,18): error TS2724: '"@ember/test-helpers/setup-rendering-context"' has no exported member named 'rerender'. Did you mean 'render'?

Should be fixed by #1304 / #1305

Indeed; and thank you!