mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
refactor(): global refactoring to avoid IDE warnings and cleaner code (#11296)
* refactor(style): redundant measure units * refactor(): change pointless boolean operation to cast * refactor(): change redundant 'if' statement * refactor(style): remove overwritten property value * fix(spellcheck): wrong attribute value * refactor(datetime-test): There should be a space between attribute and previous attribute * refactor(import): import can be shortened * refactor(semicolon): add missing semicolon * docs(): fix incorrect parameter name * refactor(): remove trailing unused parameters * fix(menu): create mock change signature * refactor(): remove redundant imports all tests are passing * refactor(style): 'var' used instead of 'let' or 'const' * Revert "refactor(style): 'var' used instead of 'let' or 'const'" This reverts commit 0369dbcaa877b69534e6e78cb17f6b8aa7603597. * refacrot(): remove unused code * Revert "refactor(style): remove overwritten property value" * revert(hammer): don't modify 3rd party files * revert(activator): follow interface * revert(activator): follow interface (cont) * revert(activator): follow interface (cont) * merge(master): fix conflicts * revert(): change pointless boolean operation to cast * revert(): text align is covered by a different PR * revert(): add back unused parameters * revert(): add back unused parameters
This commit is contained in:
@ -505,9 +505,10 @@ export abstract class NavController {
|
||||
|
||||
/**
|
||||
* Set the root for the current navigation stack.
|
||||
* @param {Page|string|ViewController} page The name of the component you want to push on the navigation stack.
|
||||
* @param {Page|string|ViewController} pageOrViewCtrl The name of the component you want to push on the navigation stack.
|
||||
* @param {object} [params={}] Any NavParams you want to pass along to the next view.
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion.
|
||||
* @param {Function} done Callback function on done.
|
||||
* @returns {Promise} Returns a promise which is resolved when the transition has completed.
|
||||
*/
|
||||
abstract setRoot(pageOrViewCtrl: Page | string | ViewController, params?: any, opts?: NavOptions, done?: Function): Promise<any>;
|
||||
|
@ -41,7 +41,7 @@ export class NavParams {
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @param {string} parameter Which param you want to look up
|
||||
* @param {string} param Which param you want to look up
|
||||
*/
|
||||
get(param: string): any {
|
||||
return this.data[param];
|
||||
|
@ -25,7 +25,7 @@ export class OverlayProxy {
|
||||
/**
|
||||
* Present the modal instance.
|
||||
*
|
||||
* @param {NavOptions} [opts={}] Nav options to go with this transition.
|
||||
* @param {NavOptions} [navOptions={}] Nav options to go with this transition.
|
||||
* @returns {Promise} Returns a promise which is resolved when the transition has completed.
|
||||
*/
|
||||
present(navOptions: NavOptions = {}) {
|
||||
|
@ -10,7 +10,7 @@ describe('Overlay Proxy', () => {
|
||||
instance.overlay = mockOverlay();
|
||||
spyOn(instance.overlay, instance.overlay.dismiss.name).and.returnValue(Promise.resolve());
|
||||
|
||||
const promise = instance.dismiss(null, null, null);
|
||||
const promise = instance.dismiss();
|
||||
|
||||
promise.then(() => {
|
||||
expect(instance.overlay.dismiss).toHaveBeenCalled();
|
||||
|
@ -164,7 +164,7 @@ export class ViewController {
|
||||
* Dismiss the current viewController
|
||||
* @param {any} [data] Data that you want to return when the viewController is dismissed.
|
||||
* @param {any} [role ]
|
||||
* @param {NavOptions} NavOptions Options for the dismiss navigation.
|
||||
* @param {NavOptions} navOptions Options for the dismiss navigation.
|
||||
* @returns {any} data Returns the data passed in, if any.
|
||||
*/
|
||||
dismiss(data?: any, role?: string, navOptions: NavOptions = {}): Promise<any> {
|
||||
@ -396,7 +396,7 @@ export class ViewController {
|
||||
/**
|
||||
* Change the title of the back-button. Be sure to call this
|
||||
* after `ionViewWillEnter` to make sure the DOM has been rendered.
|
||||
* @param {string} backButtonText Set the back button text.
|
||||
* @param {string} val Set the back button text.
|
||||
*/
|
||||
setBackButtonText(val: string) {
|
||||
this._nb && this._nb.setBackButtonText(val);
|
||||
|
Reference in New Issue
Block a user