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: Properties ionNavWillChange and ionNavDidChange do not exist on IonNav #28863

Closed
3 tasks done
projectormato opened this issue Jan 21, 2024 · 2 comments
Closed
3 tasks done
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author

Comments

@projectormato
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Using Ionic version 7.5.0 or later, this code cause an error:

export interface HogeHogeNav {
    readonly navWillChange: IonNav['ionNavWillChange'];
    readonly navDidChange: IonNav['ionNavDidChange'];
}

The error message is:

Error TS2339: Property 'ionNavWillChange' does not exist on type 'IonNav'.
readonly navWillChange: IonNav['ionNavWillChange'];

Expected Behavior

No error if possible

Steps to Reproduce

  1. Write this code
export interface HogeHogeNav {
    readonly navWillChange: IonNav['ionNavWillChange'];
    readonly navDidChange: IonNav['ionNavDidChange'];
}
  1. run npm run build

Code Reproduction URL

No response

Ionic Info

Ionic:

   Ionic CLI                     : 7.2.0
   Ionic Framework               : @ionic/angular 7.5.0
   @angular-devkit/build-angular : 15.2.9
   @angular-devkit/schematics    : 15.2.9
   @angular/cli                  : 15.2.9
   @ionic/angular-toolkit        : 7.0.0

Cordova:

   Cordova CLI       : not installed
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed globally
   native-run  : not installed globally

System:

   ios-sim : 8.0.2
   NodeJS  : v18.17.0
   npm     : 9.6.7
   OS      : macOS Unknown
   Xcode   : Xcode 15.0.1 Build version 15A507

Additional Information

In versions prior to 7.5.0, the IonNav interface was implemented like this:

export declare interface IonNav extends Components.IonNav {
  /**
   * Event fired when the nav will change components
   */
  ionNavWillChange: EventEmitter<CustomEvent<void>>;
  /**
   * Event fired when the nav has changed components
   */
  ionNavDidChange: EventEmitter<CustomEvent<void>>;
}

diff:
https://github.com/ionic-team/ionic-framework/pull/28311/files#diff-1fd76195dbb521bd6fc15558ddb677c06cd4a94d7541ecdea25409b875ea71daL1419-L1428

in version 7.5.0 and later, the implementation seems to have changed to:

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export declare interface IonNav extends Components.IonNav {}

diff:
https://github.com/ionic-team/ionic-framework/pull/28311/files#diff-d84d2a25aef8d8c26050fe026186e82c53be36a44acd0c4343af76a671dfb58dR25-R26

Was this removal of ionNavWillChange and ionNavDidChange to IonNav interface intentional?

@ionitron-bot ionitron-bot bot added the triage label Jan 21, 2024
@liamdebeasi liamdebeasi self-assigned this Jan 23, 2024
@liamdebeasi liamdebeasi added the ionitron: needs reproduction a code reproduction is needed from the issue author label Jan 23, 2024
@liamdebeasi liamdebeasi removed their assignment Jan 23, 2024
Copy link

ionitron-bot bot commented Jan 23, 2024

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.

@ionitron-bot ionitron-bot bot removed the triage label Jan 23, 2024
@averyjohnston
Copy link
Contributor

This issue is being closed due to insufficient reproduction. If this is still a problem in the latest version of Ionic, please open a new issue and ensure the template is fully filled out. Thank you!

@averyjohnston averyjohnston closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@ionic-team ionic-team locked and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author
Projects
None yet
Development

No branches or pull requests

3 participants