typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
110 stars 51 forks source link

Decorators not happy in ember-route-template #767

Closed knownasilya closed 2 weeks ago

knownasilya commented 1 month ago

Not happy with decorators when using class components in ember-route-template:

export default RouteTemplate(
  class PetsEditRouteComponent extends Component<PetsEditRouteSignature> {
    @service declare router: RouterService;
    //^ Decorators are not valid here.glint(1206)

My tsconfig.json

{
  "extends": "@tsconfig/ember",
  "compilerOptions": {
    // The combination of `baseUrl` with `paths` allows Ember's classic package
    // layout, which is not resolvable with the Node resolution algorithm, to
    // work with TypeScript.
    "baseUrl": ".",
    "paths": {
      "afd/tests/*": ["tests/*"],
      "afd/*": ["app/*"],
      "*": ["types/*"]
    },
    "lib": ["DOM", "dom.iterable", "ES2023"],
    "experimentalDecorators": true
  },
  "include": ["app/**/*", "tests/**/*", "types/**/*"],
  "glint": {
    "environment": ["ember-loose", "ember-template-imports"]
  }
}
NullVoxPopuli commented 1 month ago

what's "not happy"? is there an error? stack? etc?

knownasilya commented 1 month ago

I put it in the comment above, but that might have been easy to miss

Screenshot 2024-09-23 at 8 49 27 AM
NullVoxPopuli commented 2 weeks ago

I think this is resolved!

(in 1.5)

knownasilya commented 2 weeks ago

@NullVoxPopuli confirmed