Skip to content

bug: ModalOptions no longer accepts a Type parameter #31012

Closed

Description

@Ionaru

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Using this code:

import { ModalOptions } from '@ionic/angular';

const modal = await this.modalController.create({
  component: MyModalComponent,
} satisfies ModalOptions<typeof MyModalComponent>);

It errors:

[ERROR] TS2315: Type 'ModalOptions' is not generic.

Expected Behavior

This code:

import { ModalOptions } from '@ionic/angular';

const modal = await this.modalController.create({
  component: MyModalComponent,
} satisfies ModalOptions<typeof MyModalComponent>);

Should not error and correctly verify that component is MyModalComponent

Steps to Reproduce

N/A

Code Reproduction URL

N/A

Ionic Info

N/A

Additional Information

Bug introduced in #30899, specifically in commit 641f319.

Ionic 8.8.0 was the first version with this bug.

Activity

  1. added and removed on Mar 18, 2026
  2. ionitron-bot commented on Mar 18, 2026

    @ionitron-bot

    Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

    Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

    If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

    For a guide on how to create a good reproduction, see our Contributing Guide.

  3. Ionaru commented on Mar 19, 2026

    @Ionaru
    Author
  4. added
    type: buga confirmed bug report
    and removed on Mar 19, 2026
  5. ShaneK commented on Mar 19, 2026

    @ShaneK
    Member

    Hey, sorry! This issue was created in this PR when we at the last minute decided to re-export ModalOptions and accidentally overlooked this problem. I'll have a PR up to fix this shortly and hopefully get this out in the next patch version!

  6. added a commit that references this issue on Mar 19, 2026
    cbfe7cc
  7. ShaneK commented on Mar 25, 2026

    @ShaneK
    Member

    Hey! This was fixed in today's release, v8.8.2! We appreciate the report, sorry about the issue!

  8. added a commit that references this issue on Mar 26, 2026
    ed9bee5
  9. ionitron-bot commented on Apr 24, 2026

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  10. locked and limited conversation to collaborators on Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions