Skip to content

Commit 91100a5

Browse files
authored
fix(modal): afterClose return type (#DS-2793) (#257)
1 parent dced216 commit 91100a5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/components/modal/modal-ref.class.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { KbqModalComponent } from './modal.component';
77
*/
88
export abstract class KbqModalRef<C = any, R = unknown> {
99
abstract afterOpen: Observable<void>;
10-
abstract afterClose: Observable<R>;
10+
abstract afterClose: Observable<R | undefined>;
1111

1212
abstract open(): void;
1313

packages/components/modal/modal.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class KbqModalComponent<T = any, R = any>
124124
// Trigger when modal open(visible) after animations
125125
@Output() kbqAfterOpen = new EventEmitter<void>();
126126
// Trigger when modal leave-animation over
127-
@Output() kbqAfterClose = new EventEmitter<R>();
127+
@Output() kbqAfterClose = new EventEmitter<R | undefined>();
128128

129129
// --- Predefined OK & Cancel buttons
130130
@Input() kbqOkText: string;
@@ -176,7 +176,7 @@ export class KbqModalComponent<T = any, R = any>
176176
}
177177

178178
// Observable alias for kbqAfterClose
179-
get afterClose(): Observable<R> {
179+
get afterClose(): Observable<R | undefined> {
180180
return this.kbqAfterClose.asObservable();
181181
}
182182

tools/public_api_guard/components/modal.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class KbqModalComponent<T = any, R = any> extends KbqModalRef<T, R> imple
8686
// Warning: (ae-forgotten-export) The symbol "KbqModalControlService" needs to be exported by the entry point index.d.ts
8787
constructor(overlay: Overlay, renderer: Renderer2, cfr: ComponentFactoryResolver, elementRef: ElementRef, viewContainer: ViewContainerRef, modalControl: KbqModalControlService, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor, document: any);
8888
// (undocumented)
89-
get afterClose(): Observable<R>;
89+
get afterClose(): Observable<R | undefined>;
9090
// (undocumented)
9191
get afterOpen(): Observable<void>;
9292
// (undocumented)
@@ -134,7 +134,7 @@ export class KbqModalComponent<T = any, R = any> extends KbqModalRef<T, R> imple
134134
// (undocumented)
135135
isTopOverflow: boolean;
136136
// (undocumented)
137-
kbqAfterClose: EventEmitter<R>;
137+
kbqAfterClose: EventEmitter<R | undefined>;
138138
// (undocumented)
139139
kbqAfterOpen: EventEmitter<void>;
140140
// (undocumented)
@@ -276,7 +276,7 @@ export class KbqModalModule {
276276
// @public
277277
export abstract class KbqModalRef<C = any, R = unknown> {
278278
// (undocumented)
279-
abstract afterClose: Observable<R>;
279+
abstract afterClose: Observable<R | undefined>;
280280
// (undocumented)
281281
abstract afterOpen: Observable<void>;
282282
// (undocumented)

0 commit comments

Comments
 (0)