diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9037b50..9287b0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,19 @@ env: CI: true jobs: + type_checking: + if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" + name: Check Types + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + + - run: yarn install --frozen-lockfile + - run: yarn prepack + + tests: if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" name: Base Tests @@ -61,7 +74,7 @@ jobs: name: "Compatibility" timeout-minutes: 7 runs-on: ubuntu-latest - needs: tests + needs: [ tests, type_checking ] strategy: fail-fast: true diff --git a/addon/index.ts b/addon/index.ts index 290368e..c714ef1 100644 --- a/addon/index.ts +++ b/addon/index.ts @@ -16,7 +16,7 @@ type TransitionWithPrivateAPIs = Transition & { }; }; -export function withHashSupport(AppRouter: typeof EmberRouter) { +export function withHashSupport(AppRouter: typeof EmberRouter): typeof AppRouter { return class RouterWithHashSupport extends AppRouter { constructor(...args: RouterArgs) { super(...args); diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.ts similarity index 100% rename from tests/dummy/app/app.js rename to tests/dummy/app/app.ts diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.ts similarity index 100% rename from tests/dummy/app/router.js rename to tests/dummy/app/router.ts diff --git a/tests/test-helper.js b/tests/test-helper.ts similarity index 100% rename from tests/test-helper.js rename to tests/test-helper.ts