fix(core): type collisions with namespace (#8809)

This commit is contained in:
Nathan Walker
2021-02-25 21:03:07 -08:00
parent a67fb69687
commit 733050995c
110 changed files with 1882 additions and 1827 deletions

View File

@@ -245,10 +245,10 @@ export abstract class ViewBase extends Observable {
public bindingContext: any;
/**
* Gets or sets if the view is reusable.
* Reusable views are not automatically destroyed when removed from the View tree.
*/
public reusable: boolean;
* Gets or sets if the view is reusable.
* Reusable views are not automatically destroyed when removed from the View tree.
*/
public reusable: boolean;
/**
* Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
@@ -385,11 +385,11 @@ export abstract class ViewBase extends Observable {
_tearDownUI(force?: boolean): void;
/**
* Tears down the UI of a reusable node by making it no longer reusable.
* @see _tearDownUI
* @param forceDestroyChildren Force destroy the children (even if they are reusable)
*/
destroyNode(forceDestroyChildren?: boolean): void;
* Tears down the UI of a reusable node by making it no longer reusable.
* @see _tearDownUI
* @param forceDestroyChildren Force destroy the children (even if they are reusable)
*/
destroyNode(forceDestroyChildren?: boolean): void;
/**
* Creates a native view.

View File

@@ -10,7 +10,7 @@ import { Binding, BindingOptions } from '../bindable';
import { Trace } from '../../../trace';
import { Observable, PropertyChangeData, WrappedValue } from '../../../data/observable';
import { Style } from '../../styling/style';
import { Length, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty } from '../../styling/style-properties';
import { Length, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty, LengthType } from '../../styling/style-properties';
// TODO: Remove this import!
import { getClass } from '../../../utils/types';
@@ -284,8 +284,8 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
public _automaticallyAdjustsScrollViewInsets: boolean;
// Dynamic properties.
left: Length;
top: Length;
left: LengthType;
top: LengthType;
effectiveLeft: number;
effectiveTop: number;
dock: 'left' | 'top' | 'right' | 'bottom';

View File

@@ -10,37 +10,8 @@ import { Trace } from '../../../trace';
import { ShowModalOptions } from '../view-base';
import { EventData } from '../../../data/observable';
import {
perspectiveProperty,
Length,
PercentLength,
Visibility,
HorizontalAlignment,
VerticalAlignment,
visibilityProperty,
opacityProperty,
horizontalAlignmentProperty,
verticalAlignmentProperty,
minWidthProperty,
minHeightProperty,
widthProperty,
heightProperty,
marginLeftProperty,
marginTopProperty,
marginRightProperty,
marginBottomProperty,
rotateProperty,
rotateXProperty,
rotateYProperty,
scaleXProperty,
scaleYProperty,
translateXProperty,
translateYProperty,
zIndexProperty,
backgroundInternalProperty,
androidElevationProperty,
androidDynamicElevationOffsetProperty,
} from '../../styling/style-properties';
import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, widthProperty, heightProperty, marginLeftProperty, marginTopProperty, marginRightProperty, marginBottomProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty, LengthType, PercentLengthType } from '../../styling/style-properties';
import { Enums } from '../../enums';
import { Background, ad as androidBackground } from '../../styling/background';
import { profile } from '../../../profiling';
@@ -759,7 +730,7 @@ export class View extends ViewCommon {
this.nativeViewProtected.setFocusable(value);
}
[visibilityProperty.getDefault](): Visibility {
[visibilityProperty.getDefault](): Enums.VisibilityType {
const nativeVisibility = this.nativeViewProtected.getVisibility();
switch (nativeVisibility) {
case android.view.View.VISIBLE:
@@ -772,7 +743,7 @@ export class View extends ViewCommon {
throw new Error(`Unsupported android.view.View visibility: ${nativeVisibility}. Currently supported values are android.view.View.VISIBLE, android.view.View.INVISIBLE, android.view.View.GONE.`);
}
}
[visibilityProperty.setNative](value: Visibility) {
[visibilityProperty.setNative](value: Enums.VisibilityType) {
switch (value) {
case 'visible':
this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
@@ -946,10 +917,10 @@ export class View extends ViewCommon {
nativeView.setStateListAnimator(stateListAnimator);
}
[horizontalAlignmentProperty.getDefault](): HorizontalAlignment {
return <HorizontalAlignment>org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
[horizontalAlignmentProperty.getDefault](): Enums.HorizontalAlignmentType {
return <Enums.HorizontalAlignmentType>org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
}
[horizontalAlignmentProperty.setNative](value: HorizontalAlignment) {
[horizontalAlignmentProperty.setNative](value: Enums.HorizontalAlignmentType) {
const nativeView = this.nativeViewProtected;
const lp: any = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
// Set only if params gravity exists.
@@ -984,10 +955,10 @@ export class View extends ViewCommon {
}
}
[verticalAlignmentProperty.getDefault](): VerticalAlignment {
return <VerticalAlignment>org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
[verticalAlignmentProperty.getDefault](): Enums.VerticalAlignmentType {
return <Enums.VerticalAlignmentType>org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
}
[verticalAlignmentProperty.setNative](value: VerticalAlignment) {
[verticalAlignmentProperty.setNative](value: Enums.VerticalAlignmentType) {
const nativeView = this.nativeViewProtected;
const lp: any = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
// Set only if params gravity exists.
@@ -1083,7 +1054,7 @@ export class View extends ViewCommon {
this._redrawNativeBackground(value);
}
[minWidthProperty.setNative](value: Length) {
[minWidthProperty.setNative](value: LengthType) {
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
this.parent._setChildMinWidthNative(this, value);
} else {
@@ -1091,7 +1062,7 @@ export class View extends ViewCommon {
}
}
[minHeightProperty.setNative](value: Length) {
[minHeightProperty.setNative](value: LengthType) {
if (this.parent instanceof CustomLayoutView && this.parent.nativeViewProtected) {
this.parent._setChildMinHeightNative(this, value);
} else {
@@ -1180,11 +1151,11 @@ export class CustomLayoutView extends ContainerView implements CustomLayoutViewD
// noop
}
public _setChildMinWidthNative(child: View, value: Length): void {
public _setChildMinWidthNative(child: View, value: LengthType): void {
child._setMinWidthNative(value);
}
public _setChildMinHeightNative(child: View, value: Length): void {
public _setChildMinHeightNative(child: View, value: LengthType): void {
child._setMinHeightNative(value);
}
@@ -1221,7 +1192,7 @@ function createNativePercentLengthProperty(options: NativePercentLengthPropertyO
const { getter, setter, auto = 0 } = options;
let setPixels, getPixels, setPercent;
if (getter) {
View.prototype[getter] = function (this: View): PercentLength {
View.prototype[getter] = function (this: View): PercentLengthType {
if (options) {
setPixels = options.setPixels;
getPixels = options.getPixels;
@@ -1238,7 +1209,7 @@ function createNativePercentLengthProperty(options: NativePercentLengthPropertyO
};
}
if (setter) {
View.prototype[setter] = function (this: View, length: PercentLength) {
View.prototype[setter] = function (this: View, length: PercentLengthType) {
if (options) {
setPixels = options.setPixels;
getPixels = options.getPixels;

View File

@@ -3,11 +3,12 @@ import { Property, InheritedProperty } from '../properties';
import { EventData } from '../../../data/observable';
import { Color } from '../../../color';
import { Animation, AnimationDefinition, AnimationPromise } from '../../animation';
import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength } from '../../styling/style-properties';
import { LengthType, PercentLengthType } from '../../styling/style-properties';
import { GestureTypes, GesturesObserver } from '../../gestures';
import { LinearGradient } from '../../styling/gradient';
import { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState, AccessibilityTrait, AndroidAccessibilityEvent, IOSPostAccessibilityNotificationType } from '../../../accessibility/accessibility-types';
import { BoxShadow } from '../../styling/box-shadow';
import { Enums } from '../../enums';
import { CSSShadow } from '../../styling/css-shadow';
// helpers (these are okay re-exported here)
export * from './view-helper';
@@ -192,52 +193,52 @@ export abstract class View extends ViewBase {
/**
* Gets or sets the border width of the view.
*/
borderWidth: string | Length;
borderWidth: string | LengthType;
/**
* Gets or sets the top border width of the view.
*/
borderTopWidth: Length;
borderTopWidth: LengthType;
/**
* Gets or sets the right border width of the view.
*/
borderRightWidth: Length;
borderRightWidth: LengthType;
/**
* Gets or sets the bottom border width of the view.
*/
borderBottomWidth: Length;
borderBottomWidth: LengthType;
/**
* Gets or sets the left border width of the view.
*/
borderLeftWidth: Length;
borderLeftWidth: LengthType;
/**
* Gets or sets the border radius of the view.
*/
borderRadius: string | Length;
borderRadius: string | LengthType;
/**
* Gets or sets the top left border radius of the view.
*/
borderTopLeftRadius: Length;
borderTopLeftRadius: LengthType;
/**
* Gets or sets the top right border radius of the view.
*/
borderTopRightRadius: Length;
borderTopRightRadius: LengthType;
/**
* Gets or sets the bottom right border radius of the view.
*/
borderBottomRightRadius: Length;
borderBottomRightRadius: LengthType;
/**
* Gets or sets the bottom left border radius of the view.
*/
borderBottomLeftRadius: Length;
borderBottomLeftRadius: LengthType;
/**
* Gets or sets the color of the view.
@@ -334,67 +335,67 @@ export abstract class View extends ViewBase {
/**
* Gets or sets the box shadow of the view.
*/
boxShadow: string | BoxShadow;
boxShadow: string | CSSShadow;
/**
* Gets or sets the minimum width the view may grow to.
*/
minWidth: Length;
minWidth: LengthType;
/**
* Gets or sets the minimum height the view may grow to.
*/
minHeight: Length;
minHeight: LengthType;
/**
* Gets or sets the desired width of the view.
*/
width: PercentLength;
width: PercentLengthType;
/**
* Gets or sets the desired height of the view.
*/
height: PercentLength;
height: PercentLengthType;
/**
* Gets or sets margin style property.
*/
margin: string | PercentLength;
margin: string | PercentLengthType;
/**
* Specifies extra space on the left side of this view.
*/
marginLeft: PercentLength;
marginLeft: PercentLengthType;
/**
* Specifies extra space on the top side of this view.
*/
marginTop: PercentLength;
marginTop: PercentLengthType;
/**
* Specifies extra space on the right side of this view.
*/
marginRight: PercentLength;
marginRight: PercentLengthType;
/**
* Specifies extra space on the bottom side of this view.
*/
marginBottom: PercentLength;
marginBottom: PercentLengthType;
/**
* Gets or sets the alignment of this view within its parent along the Horizontal axis.
*/
horizontalAlignment: HorizontalAlignment;
horizontalAlignment: Enums.HorizontalAlignmentType;
/**
* Gets or sets the alignment of this view within its parent along the Vertical axis.
*/
verticalAlignment: VerticalAlignment;
verticalAlignment: Enums.VerticalAlignmentType;
/**
* Gets or sets the visibility of the view.
*/
visibility: Visibility;
visibility: Enums.VisibilityType;
/**
* Gets or sets the opacity style property.
@@ -837,11 +838,11 @@ export abstract class View extends ViewBase {
/**
* @private
*/
_setMinWidthNative(value: Length): void;
_setMinWidthNative(value: LengthType): void;
/**
* @private
*/
_setMinHeightNative(value: Length): void;
_setMinHeightNative(value: LengthType): void;
/**
* @private
*/
@@ -917,11 +918,11 @@ export class CustomLayoutView extends ContainerView {
/**
* @private
*/
_setChildMinWidthNative(child: View, value: Length): void;
_setChildMinWidthNative(child: View, value: LengthType): void;
/**
* @private
*/
_setChildMinHeightNative(child: View, value: Length): void;
_setChildMinHeightNative(child: View, value: LengthType): void;
//@endprivate
}

View File

@@ -8,10 +8,11 @@ import { Trace } from '../../../trace';
import { layout, iOSNativeHelper } from '../../../utils';
import { IOSHelper } from './view-helper';
import { ios as iosBackground, Background } from '../../styling/background';
import { perspectiveProperty, Visibility, visibilityProperty, opacityProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, clipPathProperty } from '../../styling/style-properties';
import { perspectiveProperty, visibilityProperty, opacityProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, clipPathProperty } from '../../styling/style-properties';
import { profile } from '../../../profiling';
import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLanguageProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityTraitsProperty, accessibilityValueProperty } from '../../../accessibility/accessibility-properties';
import { setupAccessibleView, IOSPostAccessibilityNotificationType, isAccessibilityServiceEnabled, updateAccessibilityProperties } from '../../../accessibility';
import { Enums } from '../../enums';
export * from './view-common';
// helpers (these are okay re-exported here)
@@ -627,20 +628,20 @@ export class View extends ViewCommon implements ViewDefinition {
this.nativeViewProtected.userInteractionEnabled = value;
}
[visibilityProperty.getDefault](): Visibility {
return this.nativeViewProtected.hidden ? Visibility.COLLAPSE : Visibility.VISIBLE;
[visibilityProperty.getDefault](): Enums.VisibilityType {
return this.nativeViewProtected.hidden ? Enums.Visibility.collapse : Enums.Visibility.visible;
}
[visibilityProperty.setNative](value: Visibility) {
[visibilityProperty.setNative](value: Enums.VisibilityType) {
switch (value) {
case Visibility.VISIBLE:
case Enums.Visibility.visible:
this.nativeViewProtected.hidden = false;
break;
case Visibility.HIDDEN:
case Visibility.COLLAPSE:
case Enums.Visibility.hidden:
case Enums.Visibility.collapse:
this.nativeViewProtected.hidden = true;
break;
default:
throw new Error(`Invalid visibility value: ${value}. Valid values are: "${Visibility.VISIBLE}", "${Visibility.HIDDEN}", "${Visibility.COLLAPSE}".`);
throw new Error(`Invalid visibility value: ${value}. Valid values are: "${Enums.Visibility.visible}", "${Enums.Visibility.hidden}", "${Enums.Visibility.collapse}".`);
}
}

View File

@@ -8,9 +8,10 @@ import { Color } from '../../../color';
import { Property, InheritedProperty } from '../properties';
import { EventData } from '../../../data/observable';
import { Trace } from '../../../trace';
import { Enums } from '../../enums';
import { ViewHelper } from './view-helper';
import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength, BackgroundRepeat } from '../../styling/style-properties';
import { PercentLength, LengthType, PercentLengthType } from '../../styling/style-properties';
import { observe as gestureObserve, GesturesObserver, GestureTypes, GestureEventData, fromString as gestureFromString } from '../../gestures';
@@ -19,7 +20,6 @@ import { Builder } from '../../builder';
import { sanitizeModuleName } from '../../builder/module-name-sanitizer';
import { StyleScope } from '../../styling/style-scope';
import { LinearGradient } from '../../styling/linear-gradient';
import { TextTransform } from '../../text-base';
import * as am from '../../animation';
import { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState, AccessibilityTrait, AndroidAccessibilityEvent, IOSPostAccessibilityNotificationType } from '../../../accessibility/accessibility-types';
@@ -92,8 +92,8 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
_currentWidthMeasureSpec: number;
_currentHeightMeasureSpec: number;
_setMinWidthNative: (value: Length) => void;
_setMinHeightNative: (value: Length) => void;
_setMinWidthNative: (value: LengthType) => void;
_setMinHeightNative: (value: LengthType) => void;
public _gestureObservers = {};
@@ -472,73 +472,73 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
this.style.borderLeftColor = value;
}
get borderWidth(): string | Length {
get borderWidth(): string | LengthType {
return this.style.borderWidth;
}
set borderWidth(value: string | Length) {
set borderWidth(value: string | LengthType) {
this.style.borderWidth = value;
}
get borderTopWidth(): Length {
get borderTopWidth(): LengthType {
return this.style.borderTopWidth;
}
set borderTopWidth(value: Length) {
set borderTopWidth(value: LengthType) {
this.style.borderTopWidth = value;
}
get borderRightWidth(): Length {
get borderRightWidth(): LengthType {
return this.style.borderRightWidth;
}
set borderRightWidth(value: Length) {
set borderRightWidth(value: LengthType) {
this.style.borderRightWidth = value;
}
get borderBottomWidth(): Length {
get borderBottomWidth(): LengthType {
return this.style.borderBottomWidth;
}
set borderBottomWidth(value: Length) {
set borderBottomWidth(value: LengthType) {
this.style.borderBottomWidth = value;
}
get borderLeftWidth(): Length {
get borderLeftWidth(): LengthType {
return this.style.borderLeftWidth;
}
set borderLeftWidth(value: Length) {
set borderLeftWidth(value: LengthType) {
this.style.borderLeftWidth = value;
}
get borderRadius(): string | Length {
get borderRadius(): string | LengthType {
return this.style.borderRadius;
}
set borderRadius(value: string | Length) {
set borderRadius(value: string | LengthType) {
this.style.borderRadius = value;
}
get borderTopLeftRadius(): Length {
get borderTopLeftRadius(): LengthType {
return this.style.borderTopLeftRadius;
}
set borderTopLeftRadius(value: Length) {
set borderTopLeftRadius(value: LengthType) {
this.style.borderTopLeftRadius = value;
}
get borderTopRightRadius(): Length {
get borderTopRightRadius(): LengthType {
return this.style.borderTopRightRadius;
}
set borderTopRightRadius(value: Length) {
set borderTopRightRadius(value: LengthType) {
this.style.borderTopRightRadius = value;
}
get borderBottomRightRadius(): Length {
get borderBottomRightRadius(): LengthType {
return this.style.borderBottomRightRadius;
}
set borderBottomRightRadius(value: Length) {
set borderBottomRightRadius(value: LengthType) {
this.style.borderBottomRightRadius = value;
}
get borderBottomLeftRadius(): Length {
get borderBottomLeftRadius(): LengthType {
return this.style.borderBottomLeftRadius;
}
set borderBottomLeftRadius(value: Length) {
set borderBottomLeftRadius(value: LengthType) {
this.style.borderBottomLeftRadius = value;
}
@@ -584,10 +584,10 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
this.style.backgroundPosition = value;
}
get backgroundRepeat(): BackgroundRepeat {
get backgroundRepeat(): Enums.BackgroundRepeatType {
return this.style.backgroundRepeat;
}
set backgroundRepeat(value: BackgroundRepeat) {
set backgroundRepeat(value: Enums.BackgroundRepeatType) {
this.style.backgroundRepeat = value;
}
@@ -598,87 +598,88 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
this.style.boxShadow = value;
}
get minWidth(): Length {
get minWidth(): LengthType {
return this.style.minWidth;
}
set minWidth(value: Length) {
set minWidth(value: LengthType) {
this.style.minWidth = value;
}
get minHeight(): Length {
get minHeight(): LengthType {
return this.style.minHeight;
}
set minHeight(value: Length) {
set minHeight(value: LengthType) {
this.style.minHeight = value;
}
get width(): PercentLength {
get width(): PercentLengthType {
return this.style.width;
}
set width(value: PercentLength) {
set width(value: PercentLengthType) {
this.style.width = value;
}
get height(): PercentLength {
get height(): PercentLengthType {
return this.style.height;
}
set height(value: PercentLength) {
set height(value: PercentLengthType) {
this.style.height = value;
}
get margin(): string | PercentLength {
get margin(): string | PercentLengthType {
return this.style.margin;
}
set margin(value: string | PercentLength) {
set margin(value: string | PercentLengthType) {
this.style.margin = value;
}
get marginLeft(): PercentLength {
get marginLeft(): PercentLengthType {
return this.style.marginLeft;
}
set marginLeft(value: PercentLength) {
set marginLeft(value: PercentLengthType) {
this.style.marginLeft = value;
}
get marginTop(): PercentLength {
get marginTop(): PercentLengthType {
return this.style.marginTop;
}
set marginTop(value: PercentLength) {
set marginTop(value: PercentLengthType) {
this.style.marginTop = value;
}
get marginRight(): PercentLength {
get marginRight(): PercentLengthType {
return this.style.marginRight;
}
set marginRight(value: PercentLength) {
set marginRight(value: PercentLengthType) {
this.style.marginRight = value;
}
get marginBottom(): PercentLength {
get marginBottom(): PercentLengthType {
return this.style.marginBottom;
}
set marginBottom(value: PercentLength) {
set marginBottom(value: PercentLengthType) {
this.style.marginBottom = value;
}
get horizontalAlignment(): HorizontalAlignment {
get horizontalAlignment(): Enums.HorizontalAlignmentType {
return this.style.horizontalAlignment;
}
set horizontalAlignment(value: HorizontalAlignment) {
set horizontalAlignment(value: Enums.HorizontalAlignmentType) {
this.style.horizontalAlignment = value;
}
get verticalAlignment(): VerticalAlignment {
get verticalAlignment(): Enums.VerticalAlignmentType {
return this.style.verticalAlignment;
}
set verticalAlignment(value: VerticalAlignment) {
set verticalAlignment(value: Enums.VerticalAlignmentType) {
this.style.verticalAlignment = value;
}
get visibility(): Visibility {
get visibility(): Enums.VisibilityType {
return this.style.visibility;
}
set visibility(value: Visibility) {
set visibility(value: Enums.VisibilityType) {
this.style.visibility = value;
}
@@ -717,10 +718,10 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
this.style.perspective = value;
}
get textTransform(): TextTransform {
get textTransform(): Enums.TextTransformType {
return this.style.textTransform;
}
set textTransform(value: TextTransform) {
set textTransform(value: Enums.TextTransformType) {
this.style.textTransform = value;
}

View File

@@ -1,6 +1,6 @@
// Types
import { View as ViewDefinition } from '..';
import { HorizontalAlignment as HorizontalAlignmentDefinition, VerticalAlignment as VerticalAlignmentDefinition } from '../../../styling/style-properties';
import { Enums } from '../../../enums';
// Requires
import { layout } from '../../../../utils';
@@ -58,7 +58,7 @@ export class ViewHelper {
const effectiveMarginTop = child.effectiveMarginTop;
const effectiveMarginBottom = child.effectiveMarginBottom;
let vAlignment: VerticalAlignmentDefinition;
let vAlignment: Enums.VerticalAlignmentType;
if (child.effectiveHeight >= 0 && childStyle.verticalAlignment === 'stretch') {
vAlignment = 'middle';
} else {
@@ -88,7 +88,7 @@ export class ViewHelper {
const effectiveMarginLeft = child.effectiveMarginLeft;
const effectiveMarginRight = child.effectiveMarginRight;
let hAlignment: HorizontalAlignmentDefinition;
let hAlignment: Enums.HorizontalAlignmentType;
if (child.effectiveWidth >= 0 && childStyle.horizontalAlignment === 'stretch') {
hAlignment = 'center';
} else {