Skip to content

Commit a767c8e

Browse files
authored
chore(modal): update dts for showModal(...) args (#5734)
1 parent 451589d commit a767c8e

2 files changed

Lines changed: 7 additions & 36 deletions

File tree

‎tns-core-modules/ui/core/view-base/view-base.d.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,22 @@ export abstract class ViewBase extends Observable {
116116
* This same context will be available in the arguments of the shownModally event handler.
117117
* @param closeCallback - A function that will be called when the view is closed.
118118
* Any arguments provided when calling ShownModallyData.closeCallback will be available here.
119-
* @param fullscreen - An optional parameter specifying whether to show the modal page in full-screen mode.
119+
* @param fullscreen - An optional parameter specifying whether to show the modal view in full-screen mode.
120+
* @param animated - An optional parameter specifying whether to show the modal view with animation.
121+
* @param stretched - An optional parameter specifying whether to stretch the modal view when not in full-screen mode.
120122
*/
121-
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean): ViewBase;
123+
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase;
122124

123125
/**
124126
* Shows the view passed as parameter as a modal view.
125127
* @param view - View instance to be shown modally.
126128
* @param context - Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.
127129
* @param closeCallback - A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.
128130
* @param fullscreen - An optional parameter specifying whether to show the modal view in full-screen mode.
131+
* @param animated - An optional parameter specifying whether to show the modal view with animation.
132+
* @param stretched - An optional parameter specifying whether to stretch the modal view when not in full-screen mode.
129133
*/
130-
showModal(view: ViewBase, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean): ViewBase;
134+
showModal(view: ViewBase, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase;
131135

132136
/**
133137
* Deprecated. Showing view as modal is deprecated.

‎tns-core-modules/ui/core/view/view.d.ts‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -506,39 +506,6 @@ export abstract class View extends ViewBase {
506506
*/
507507
on(event: "shownModally", callback: (args: ShownModallyData) => void, thisArg?: any);
508508

509-
/**
510-
* Shows the View contained in moduleName as a modal view.
511-
* @param moduleName - The name of the module to load starting from the application root.
512-
* @param context - Any context you want to pass to the modally shown view.
513-
* This same context will be available in the arguments of the shownModally event handler.
514-
* @param closeCallback - A function that will be called when the view is closed.
515-
* Any arguments provided when calling ShownModallyData.closeCallback will be available here.
516-
* @param fullscreen - An optional parameter specifying whether to show the modal page in full-screen mode.
517-
* @param stretched - An optional parameter specifying whether to stretch the modal page when not in full-screen mode.
518-
*/
519-
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): View;
520-
521-
/**
522-
* Shows the view passed as parameter as a modal view.
523-
* @param view - View instance to be shown modally.
524-
* @param context - Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.
525-
* @param closeCallback - A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.
526-
* @param fullscreen - An optional parameter specifying whether to show the modal view in full-screen mode.
527-
* @param stretched - An optional parameter specifying whether to stretch the modal page when not in full-screen mode.
528-
*/
529-
showModal(view: View, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): View;
530-
531-
/**
532-
* Deprecated. Showing view as modal is deprecated.
533-
* Use showModal method with arguments.
534-
*/
535-
showModal(): View;
536-
537-
/**
538-
* Closes the current modal view that this page is showing.
539-
*/
540-
closeModal(): void;
541-
542509
/**
543510
* Returns the current modal view that this page is showing (is parent of), if any.
544511
*/

0 commit comments

Comments
 (0)