Types have separate declarations of a private property

This happens because by declaring the constructor as taking a private _overlay parameter, you have created your own _overlay, but that is already defined in the base class MatSnackBar.

Remove the private part from the declaration and inherit it from the base class. Do the same for the other constructor parameters.

export class SnackbarService extends MatSnackBar{

  constructor(
    _overlay: Overlay, 
    _liveAnnouncer: LiveAnnouncer,
    ...
  ) {
     super(_overlay, _liveAnnouncer, ...);
    }
  }
}

You can still access them via this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)