-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*Like-bug: (ModifierLike, ComponentLike, etc?) When using WithBoundArgs, Type instantiation is excessively deep and possibly infinite (requiring glint-ignore/expect-error to move forward in a project) #661
Comments
I changed my args to my tiny components to be "any" and the issue went away. Issue present menu: MenuTypes.Menu;
trigger: ModifierLike; Issue gone: menu: MenuTypes.Menu;
trigger: any; So.. that strongly looks like a bug in how the types for |
Just ran in to this with a yielded component type, too |
Another repro: import Component from '@glimmer/component';
import { modifier } from 'ember-modifier';
import type { ModifierLike } from '@glint/template';
class Scroller extends Component<{ Element: HTMLDivElement; Blocks: { default: [scrollToBottom: ModifierLike<{ }>]}}> {
declare withinElement: HTMLDivElement;
ref = modifier(( el: HTMLDivElement ) => {
this.withinElement = el;
});
<template>
<div ...attributes {{this.ref}}>
{{yield (modifier scrollToBottom this.withinElement)}}
</div>
</template>
} Error:
I have another error because |
For some reason updating to 1.4.0 from 1.3.0 fixed the (only) case I have in my codebase of this issue. I'm not using template-imports (which is the only change according to the changelog) so I'm not sure how that might have had an effect... but that's that. :) |
I found this issue when simply trying to conditionally apply a modifier: <button type="button" {{(if @onClick (modifier on "click" @onClick))}}>
Click
</button> |
Repro:
git clone [email protected]:NullVoxPopuli/limber.git
cd limber
git checkout e6088f30e7036fd2bfe096e7a6c2f93c78e0e18b
pnpm build
cd apps/repl
pnpm lint:types
Error:
For this component, Menu, I've specified:
and PlainTrigger is:
and the menu types are:
idk what the solution here is, but this feels undebuggable
The text was updated successfully, but these errors were encountered: