-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Example:
const ApplicationRoot: TOC<{ Element: null }> = <template>
{{pageTitle "ExampleTsEmber"}}
<custom-element />
^ hovering here: no type information
<a></a>
^ hovering here: no type information
</template>;
export const Test: TOC<{}> = <template><ApplicationRoot /></template>;
^ hovering here: we see type informationnow, it could be expected that custom-elements don't have type information, but the regular elements have known types, props, etc.
We also need a way to define custom-elements.
I briefly thought about the "loose mode" template registry:
declare module '@glint/environment-ember-loose/registry' {
export default interface Registry extends PageTitle {
'custom-element': ComponentLike<{ Element: HTMLDivElement }>;
}
}but:
- I'm not using loose mode
- custom-elements are not ComponentLike, so I'm not sure what I would provide for their type there
an example from @trusktr:
declare module 'whatever-framework' {
interface WhateverInterface {
'my-el': WhateverFrameworkElementAttributes<MyEl, MyElAttributes>
}
}maybe we can add this to support custom elements:
import { CustomElementLike } from '@glint/template';
declare module '@glint/core/custom-elements-registry' {
export default interface Registry {
'my-el': CustomElementLike<HTMLAnchorElement, MyAttributes>
}
}?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working