lifeart / els-addon-typed-templates

Ember templates linting / autocomplete, based on Typescript language server
30 stars 3 forks source link

Issue with `t` (ember-intl) #24

Open NullVoxPopuli opened 4 years ago

NullVoxPopuli commented 4 years ago

image

{{t 'anything'}} gives the Error:

"Cannot invoke an object which is possibly undefined"

lifeart commented 4 years ago

@NullVoxPopuli, looks like registry issue, try autocomplete helper, to get all items registered.

uknown helper: image

t helper: image

Should work if registry loaded

In debug output I able to see "t" helper import

image

lifeart commented 4 years ago

@NullVoxPopuli could you show your TemplateImported_T import ?

NullVoxPopuli commented 4 years ago

I'm using ember-intl@v5 if that matters?

how do I know what TemplateImported_T is?

lifeart commented 4 years ago

@NullVoxPopuli I'm checking it on emberclear codebase, think it's already have v5. How - I can suggest way to get it from VSCode, but not confident about coc-ember.

Open "oputput" tab on bottom console panel, and select "Unstable Ember Language Server" from right dropdown.

Try change smf to get linting working, and check output, generated typescript classes from templates should apper:

image