Skip to content

Widen module type#17

Merged
NullVoxPopuli merged 1 commit intomainfrom
nvp/widen-module-type
Dec 9, 2025
Merged

Widen module type#17
NullVoxPopuli merged 1 commit intomainfrom
nvp/widen-module-type

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Collaborator

@NullVoxPopuli NullVoxPopuli commented Dec 9, 2025

Previously, this valid code:

import Application from 'ember-strict-application-resolver';
import setupInspector from "@embroider/legacy-inspector-support/ember-source-4.12";

export default class App extends Application {
  inspector = setupInspector(this);
  modules = {
    ...import.meta.glob('./router.*', { eager: true }),
    ...import.meta.glob('./templates/**/*', { eager: true }),
    ...import.meta.glob('./services/**/*', { eager: true }),
  }
}

Would get you this error:

Property 'modules' in type 'App' is not assignable to the same property in base type 'EmberApp'.
  Type '{ [x: string]: unknown; }' is not assignable to type '{ [modulePath: string]: ExportableType | { [exportName: string]: ExportableType; }; }'.
    'string' index signatures are incompatible.
      Type 'unknown' is not assignable to type 'ExportableType | { [exportName: string]: ExportableType; }'.

@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Dec 9, 2025
@NullVoxPopuli NullVoxPopuli merged commit 330ae88 into main Dec 9, 2025
15 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/widen-module-type branch December 9, 2025 15:01
@github-actions github-actions Bot mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant