@@ -921,7 +921,7 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy {
921
921
scrollPosition : ViewportScrollPosition ) {
922
922
// Reset any existing styles. This is necessary in case the
923
923
// preferred position has changed since the last `apply`.
924
- let styles = { top : null , bottom : null } as NullableCSSStyleDeclaration ;
924
+ let styles = { top : '' , bottom : '' } as CSSStyleDeclaration ;
925
925
let overlayPoint = this . _getOverlayPoint ( originPoint , this . _overlayRect , position ) ;
926
926
927
927
if ( this . _isPushed ) {
@@ -957,7 +957,7 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy {
957
957
scrollPosition : ViewportScrollPosition ) {
958
958
// Reset any existing styles. This is necessary in case the preferred position has
959
959
// changed since the last `apply`.
960
- let styles = { left : null , right : null } as NullableCSSStyleDeclaration ;
960
+ let styles = { left : '' , right : '' } as CSSStyleDeclaration ;
961
961
let overlayPoint = this . _getOverlayPoint ( originPoint , this . _overlayRect , position ) ;
962
962
963
963
if ( this . _isPushed ) {
@@ -1174,15 +1174,6 @@ interface FlexibleFit {
1174
1174
boundingBoxRect : BoundingBoxRect ;
1175
1175
}
1176
1176
1177
- /**
1178
- * Equivalent of CSSStyleDeclaration, but allows for `null` values. We need to do
1179
- * this while we support TS 3.6 and 3.7 since the built-in types are different.
1180
- * TODO(crisbeto): we can switch back to the regular CSSStyleDeclaration once we're running TS 3.7.
1181
- */
1182
- type NullableCSSStyleDeclaration = {
1183
- [ T in keyof CSSStyleDeclaration ] : CSSStyleDeclaration [ T ] | null ;
1184
- } ;
1185
-
1186
1177
/** A connected position as specified by the user. */
1187
1178
export interface ConnectedPosition {
1188
1179
originX : 'start' | 'center' | 'end' ;
@@ -1198,8 +1189,8 @@ export interface ConnectedPosition {
1198
1189
}
1199
1190
1200
1191
/** Shallow-extends a stylesheet object with another stylesheet object. */
1201
- function extendStyles ( destination : NullableCSSStyleDeclaration ,
1202
- source : NullableCSSStyleDeclaration ) : NullableCSSStyleDeclaration {
1192
+ function extendStyles ( destination : CSSStyleDeclaration ,
1193
+ source : CSSStyleDeclaration ) : CSSStyleDeclaration {
1203
1194
for ( let key in source ) {
1204
1195
if ( source . hasOwnProperty ( key ) ) {
1205
1196
destination [ key ] = source [ key ] ;
0 commit comments