Last active
September 8, 2023 08:19
-
-
Save bartocc/297928c5bcc127d903c1285356a8413a to your computer and use it in GitHub Desktop.
Component block argument signature not available in consuming app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { hash } from '@ember/helper'; | |
import { Input } from '@ember/component'; | |
import { WithBoundArgs } from '@glint/template'; | |
/***************************** | |
ConsumingComponent | |
*****************************/ | |
class ConsumingComponent extends Component { | |
<template> | |
<FooComponent as |f|> | |
{{!-- No error here --}} | |
<f.Input /> | |
</FooComponent> | |
</template> | |
} | |
/***************************** | |
FooComponent | |
*****************************/ | |
interface FooSignature { | |
Blocks: {default: [{Input: WithBoundArgs<typeof Input, 'type'>}]}; | |
} | |
export default class FooComponent extends Component<FooSignature> { | |
<template> | |
{{yield (hash Input=(component Input type="dummy"))}} | |
</template> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment