-
Notifications
You must be signed in to change notification settings - Fork 18
ComponentDefinition type #34
Copy link
Copy link
Open
Description
Currently, there is no clean way to type check for a ComponentDefinition, e.g.:
{{validated-component someComponent=(component "some-component')}}The (component) helper returns a CurlyComponentDefintion, which is a subclass of ComponentDefintion of the @glimmer/rutime package.
Ideally, I would like this API:
import Component from '@ember/component';
import { argument } from '@ember-decorators/argument';
import { type } from '@ember-decorators/argument/type';
import { ComponentDefinition } from '@ember-decorators/argument/types';
export default class ValidatedComponent extends Component {
@argument
@type(ComponentDefinition)
someComponent;
}However, I don't see an easy way to access the ComponentDefinition interface / class from the Ember world.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels