From dfcaa130e7cc0ecedf7433116391040223a91044 Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:33:54 +0000 Subject: [PATCH] chore: replace `any` with better types --- tests/unit/initializers/export-application-global-test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit/initializers/export-application-global-test.ts b/tests/unit/initializers/export-application-global-test.ts index fad65548..6b5f3a10 100644 --- a/tests/unit/initializers/export-application-global-test.ts +++ b/tests/unit/initializers/export-application-global-test.ts @@ -5,6 +5,8 @@ import Resolver from 'ember-resolver' import { classify } from '@ember/string' import { run } from '@ember/runloop' +import type AppConfig from 'dummy/config/environment' + type TestApplication = Application & { // Public types are currently incomplete, these 2 properties exist: // https://github.com/emberjs/ember.js/blob/v3.26.1/packages/@ember/application/lib/application.js#L376-L377 @@ -43,9 +45,8 @@ module('Unit | Initializer | export-application-global', function (hooks) { }) hooks.afterEach(function (this: Context) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO replace `any` - const config: any = this.application.resolveRegistration('config:environment') - const exportedApplicationGlobal: string = classify(config.modulePrefix) + const config = this.application.resolveRegistration('config:environment') as typeof AppConfig + const exportedApplicationGlobal = classify(config.modulePrefix) // @ts-expect-error: No index signature for Window delete window[exportedApplicationGlobal]