Skip to content

Commit

Permalink
'Fix' type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Apr 8, 2024
1 parent b9823a2 commit 1ea6b41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@ember/-internals/glimmer/lib/resolver.ts
Expand Up @@ -2,7 +2,7 @@ import { privatize as P } from '@ember/-internals/container';
import { ENV } from '@ember/-internals/environment';
import type { InternalFactory, InternalOwner, RegisterOptions } from '@ember/-internals/owner';
import { isFactory } from '@ember/-internals/owner';
import { assert, deprecate } from '@ember/debug';
import { assert } from '@ember/debug';
import { _instrumentStart } from '@ember/instrumentation';
import { DEBUG } from '@glimmer/env';
import type {
Expand Down
Expand Up @@ -46,6 +46,9 @@ export default abstract class TestResolverApplicationTestCase extends AbstractAp
// Some of this is almost exclusively for the hot-reload test.
// But there are a lot of places where it was expected to have multiple templates associated
// with the same component class (due to the older resolveable templates)
//
// We'll want to clean thsi up over time, and probably phase out `addComponent` entirely,
// and expclusively use `add` w/ `defineComponent`
if (ComponentClass === Component) {
ComponentClass = class extends Component {};
}
Expand All @@ -62,12 +65,12 @@ export default abstract class TestResolverApplicationTestCase extends AbstractAp
ComponentClass = templateOnly();
}

this.resolver!.add(`component:${name}`, ComponentClass);
this.resolver!.add(`component:${name}`, ComponentClass as Component);

if (typeof template === 'string') {
// moduleName not passed to this.compile, because *it's just wrong*.
// moduleName represents a path-on-disk, and we can't guarantee we have that mapping.
setComponentTemplate(this.compile(template, {}), ComponentClass);
setComponentTemplate(this.compile(template, {}), ComponentClass as Component);
}

return;
Expand Down

0 comments on commit 1ea6b41

Please sign in to comment.