Skip to content

Commit

Permalink
Add service
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Sep 27, 2023
1 parent 3ff3e52 commit cfd1fcd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Component from '@glimmer/component';
import { service } from '@ember/service';
import Example from '../services/example';

export default class CoLocatedTs extends Component {
@service declare example: Example;

whereAmI = 'from a co-located TS component';
}
5 changes: 5 additions & 0 deletions tests/fixtures/typescript/my-addon/src/services/example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Service from '@ember/service';

export default class Example extends Service {
foo = 'hello from service';
}

0 comments on commit cfd1fcd

Please sign in to comment.