glint icon indicating copy to clipboard operation
glint copied to clipboard

Decorators not happy in ember-route-template

Open knownasilya opened this issue 1 year ago • 2 comments

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"]
  }
}

knownasilya avatar Sep 23 '24 04:09 knownasilya

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

NullVoxPopuli avatar Sep 23 '24 12:09 NullVoxPopuli

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

Screenshot 2024-09-23 at 8 49 27 AM

knownasilya avatar Sep 23 '24 12:09 knownasilya

I think this is resolved!

(in 1.5)

NullVoxPopuli avatar Nov 01 '24 00:11 NullVoxPopuli

@NullVoxPopuli confirmed

knownasilya avatar Nov 01 '24 11:11 knownasilya