From cfd1fcd18c9e1248b4af295c6383b4390a81f6b0 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:16:03 -0400 Subject: [PATCH] Add service --- .../typescript/my-addon/src/components/co-located-ts.ts | 4 ++++ tests/fixtures/typescript/my-addon/src/services/example.ts | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 tests/fixtures/typescript/my-addon/src/services/example.ts diff --git a/tests/fixtures/typescript/my-addon/src/components/co-located-ts.ts b/tests/fixtures/typescript/my-addon/src/components/co-located-ts.ts index 02d0989f..ea015d6e 100644 --- a/tests/fixtures/typescript/my-addon/src/components/co-located-ts.ts +++ b/tests/fixtures/typescript/my-addon/src/components/co-located-ts.ts @@ -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'; } diff --git a/tests/fixtures/typescript/my-addon/src/services/example.ts b/tests/fixtures/typescript/my-addon/src/services/example.ts new file mode 100644 index 00000000..e13c96fc --- /dev/null +++ b/tests/fixtures/typescript/my-addon/src/services/example.ts @@ -0,0 +1,5 @@ +import Service from '@ember/service'; + +export default class Example extends Service { + foo = 'hello from service'; +}