Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Controllers are typed as any after upgrading to Ionic 6 #24387

Closed
4 of 6 tasks
raymer opened this issue Dec 14, 2021 · 2 comments · Fixed by #24388
Closed
4 of 6 tasks

bug: Controllers are typed as any after upgrading to Ionic 6 #24387

raymer opened this issue Dec 14, 2021 · 2 comments · Fixed by #24388
Labels
package: vue @ionic/vue package type: bug a confirmed bug report v6 issues specific to Framework v6

Comments

@raymer
Copy link

raymer commented Dec 14, 2021

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

After upgrading to Ionic 6. I noticed typescript errors when looking at my existing use of modalController in my Vue components related to trying to use modalController.onDidDismiss<T>.

I then noticed that it's typed as any in controllers.d.ts.

image

Expected Behavior

The controllers are strongly typed

Steps to Reproduce

  • Open Ionic 6 application
  • import modalController from @ionic/vue
  • notice it's typed as any

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 5.4.16 (C:\Users\rayme\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/vue 6.0.0

Capacitor:

Capacitor CLI : 3.2.4
@capacitor/core : 3.2.4

Utility:

cordova-res : not installed
native-run : 1.5.0

System:

NodeJS : v16.13.1 (C:\Program Files\nodejs\node.exe)
npm : 8.3.0
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Dec 14, 2021
@sean-perkins sean-perkins added package: vue @ionic/vue package type: bug a confirmed bug report labels Dec 14, 2021
@ionitron-bot ionitron-bot bot removed the triage label Dec 14, 2021
@sean-perkins
Copy link
Contributor

Thanks for reporting this issue!

It looks like when introducing custom elements, the createController method was introduced, which doesn't carry forward the types of the individual controller arguments to the return type.

@ionitron-bot
Copy link

ionitron-bot bot commented Jan 13, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: vue @ionic/vue package type: bug a confirmed bug report v6 issues specific to Framework v6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants