Skip to content

Commit

Permalink
chore: replace any with better types
Browse files Browse the repository at this point in the history
  • Loading branch information
MrChocolatine committed Nov 5, 2023
1 parent cc9dd21 commit dfcaa13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/initializers/export-application-global-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit dfcaa13

Please sign in to comment.