intellij-emberjs icon indicating copy to clipboard operation
intellij-emberjs copied to clipboard

Typescript files like component.ts are not recognized as components in hbs templates

Open janmisek opened this issue 6 years ago • 3 comments

Description

Typescript files like component.ts are not recognized as components in hbs templates. Based on standard typescript usage regarding ember-cli-typescript

Steps to Reproduce

Create component.ts file in any component namespace. component.ts use standard component definition:

import Component from "@ember/component";
export default class PropListComponent extends Component {}

Expected behavior:

Autocompletion in any hbs template will offer the component for autocompletion.

Actual behavior:

Go to any template and try component autocompletion ctrl+space, component is not there.

Reproduces how often:

Versions

Always

Additional Information

none

janmisek avatar Nov 26 '18 09:11 janmisek

Actually its only thing which blocks me from using typescript on component layer in our projects as we have large components base which is not very usable without autocompletion. Does this require big change ? if not I can try to prepare pr myself. But I have not written any intellij plugin yet so could you point me to test of this component.js behaviour. I can start from there.

janmisek avatar Nov 26 '18 09:11 janmisek

Does this require big change ? if not I can try to prepare pr myself.

I think the necessary change should be quite small, but unforunately I'm not entirely sure where it needs to be done either. If I remember correct this behavior is defined in one of the ReferenceContributor classes.

Turbo87 avatar Nov 26 '18 10:11 Turbo87

Thanks. This is just enough hint. I will take a look soon.

janmisek avatar Nov 26 '18 10:11 janmisek