From c5b99f4f4389fc25feaffe37fe6844c0cfae646d Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Fri, 3 Jun 2016 11:49:31 -0700 Subject: [PATCH] fix(core): Fix compilation errors for latest Typescript 1.9 --- src/core/overlay/position/connected-position-strategy.ts | 4 ++-- src/core/overlay/position/global-position-strategy.ts | 2 +- src/core/portal/portal-directives.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/overlay/position/connected-position-strategy.ts b/src/core/overlay/position/connected-position-strategy.ts index 52bf421f18ba..a3b1cb482a4e 100644 --- a/src/core/overlay/position/connected-position-strategy.ts +++ b/src/core/overlay/position/connected-position-strategy.ts @@ -68,14 +68,14 @@ export class ConnectedPositionStrategy implements PositionStrategy { // If the overlay in the calculated position fits on-screen, put it there and we're done. if (this._willOverlayFitWithinViewport(overlayPoint, overlayRect, viewportRect)) { this._setElementPosition(element, overlayPoint); - return Promise.resolve(); + return Promise.resolve(null); } } // TODO(jelbourn): fallback behavior for when none of the preferred positions fit on-screen. // For now, just stick it in the first position and let it go off-screen. this._setElementPosition(element, firstOverlayPoint); - return Promise.resolve(); + return Promise.resolve(null); } withFallbackPosition( diff --git a/src/core/overlay/position/global-position-strategy.ts b/src/core/overlay/position/global-position-strategy.ts index a5ed7cda84d6..d14f6c203a1f 100644 --- a/src/core/overlay/position/global-position-strategy.ts +++ b/src/core/overlay/position/global-position-strategy.ts @@ -103,7 +103,7 @@ export class GlobalPositionStrategy implements PositionStrategy { applyCssTransform(element, `${tranlateX} ${translateY}`); - return Promise.resolve(); + return Promise.resolve(null); } /** Reduce a list of translate values to a string that can be used in the transform property */ diff --git a/src/core/portal/portal-directives.ts b/src/core/portal/portal-directives.ts index fbc5abc472d6..689b36468311 100644 --- a/src/core/portal/portal-directives.ts +++ b/src/core/portal/portal-directives.ts @@ -90,7 +90,7 @@ export class PortalHostDirective extends BasePortalHost { /** Detatches the currently attached Portal (if there is one) and attaches the given Portal. */ private _replaceAttachedPortal(p: Portal): void { - let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(); + let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(null); maybeDetach.then(() => { if (p != null) {