GithubHelp home page GithubHelp logo

Comments (7)

blmundie avatar blmundie commented on July 17, 2024 1

Upgrading to 2.2.12 fixed it. Thanks for the help. Great project.

from ember-language-server.

lifeart avatar lifeart commented on July 17, 2024

Hi @blmundie! Thank you for issue, looks like you have https://github.com/lifeart/els-addon-typed-templates installed. could you provide minimal reproduction repo for such issue? Do you have template-only component?

if you have els-addon-typed-templates check it's version, likely it's outdated.

from ember-language-server.

lifeart avatar lifeart commented on July 17, 2024

could you send logs from this window?

image

from ember-language-server.

blmundie avatar blmundie commented on July 17, 2024

I have "els-addon-typed-templates": "^2.2.11",

I created a test component with only {{@testArgument}} in the template as a basic example. The output is.

[Info  - 5:08:17 PM] Ember CLI project added at /home/bryan/code/httscada_frontend
[Info  - 5:08:17 PM] /home/bryan/code/httscada_frontend: registry initialized in 357ms
[Info  - 5:08:17 PM] /home/bryan/code/httscada_frontend: script registry initialized in 3ms
[Info  - 5:08:17 PM] --------------------
[Info  - 5:08:17 PM] loded language server addons:
[Info  - 5:08:17 PM]     addon: els-addon-typed-templates
[Info  - 5:08:17 PM] --------------------
===============
import Component from "./component";

import { GlobalRegistry } from "ember-typed-templates";

interface TemplateScopeRegistry {

}

type Modify<T, R> = Omit<T, keyof R> & R;

type EmberTemplateScopeRegistry = Modify<TemplateScopeRegistry, GlobalRegistry>;



export default class Template extends Component {
  
  globalScope:  EmberTemplateScopeRegistry;
  defaultYield() {
    return [];
  }
  //@mark-meaningful-issues-start
  
  //@mark [1,0:1,17]
  "1,0:1,17 - MustacheStatement"() { return this["1,2:1,15 - PathExpression"](); /*@path-mark 1,0:1,17*/};

  //@mark [1,2:1,15]
  "1,2:1,15 - PathExpression"() { return this.args.testArgument; /*@path-mark 1,2:1,15*/};
}
===============

from ember-language-server.

lifeart avatar lifeart commented on July 17, 2024

@blmundie could you provide component js code?

Looks like compiled template extended from component without args property in constructor.
It's definetly typed-templates addon issue, and I'm trying to clarify details to figure out stable fix.

as shor-term fix you can skip typescript template / property linting using this readme part: (https://github.com/lifeart/els-addon-typed-templates#ignore-line)
image

from ember-language-server.

blmundie avatar blmundie commented on July 17, 2024

I do have a component that inherits form another component which then causes all templates to have errors. I can setup an example repo Monday. It could be that the way I'm doing the inheritance isn't correct, but what I have is basically the following.

import Component from '@glimmer/component';

export interface ParentComponentArgs {
    baseArg: boolean
}

export default class ParentComponent<Args extends ParentComponentArgs> extends Component<Args>  {
}

export interface ChildComponentArgs extends ParentComponentArgs {
    childArg: boolean
}

export default class ChildComponent extends ParentComponent<ChildComponentArgs>  {
}

from ember-language-server.

lifeart avatar lifeart commented on July 17, 2024

looks like it's dependency deph lookup limitation, https://github.com/lifeart/els-addon-typed-templates/blob/master/src/lib/hbs-converter.ts#L102 (by default - depth = +1 level)

could you change it to 10 in compiled code and relaunch vs code?

try https://github.com/lifeart/els-addon-typed-templates/releases/tag/v2.2.12
[email protected]

from ember-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.