Skip to content

Commit e366fa0

Browse files
vikermanjelbourn
authored andcommitted
fix(core): resolve compilation errors for latest Typescript 1.9 (#624)
1 parent 63f43bd commit e366fa0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/core/overlay/position/connected-position-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ export class ConnectedPositionStrategy implements PositionStrategy {
6868
// If the overlay in the calculated position fits on-screen, put it there and we're done.
6969
if (this._willOverlayFitWithinViewport(overlayPoint, overlayRect, viewportRect)) {
7070
this._setElementPosition(element, overlayPoint);
71-
return Promise.resolve();
71+
return Promise.resolve(null);
7272
}
7373
}
7474

7575
// TODO(jelbourn): fallback behavior for when none of the preferred positions fit on-screen.
7676
// For now, just stick it in the first position and let it go off-screen.
7777
this._setElementPosition(element, firstOverlayPoint);
78-
return Promise.resolve();
78+
return Promise.resolve(null);
7979
}
8080

8181
withFallbackPosition(

src/core/overlay/position/global-position-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class GlobalPositionStrategy implements PositionStrategy {
103103

104104
applyCssTransform(element, `${tranlateX} ${translateY}`);
105105

106-
return Promise.resolve();
106+
return Promise.resolve(null);
107107
}
108108

109109
/** Reduce a list of translate values to a string that can be used in the transform property */

src/core/portal/portal-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class PortalHostDirective extends BasePortalHost {
9090

9191
/** Detatches the currently attached Portal (if there is one) and attaches the given Portal. */
9292
private _replaceAttachedPortal(p: Portal<any>): void {
93-
let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve();
93+
let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(null);
9494

9595
maybeDetach.then(() => {
9696
if (p != null) {

0 commit comments

Comments
 (0)