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

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

View File

@@ -1,12 +1,13 @@
import { Image as ImageDefinition, Stretch } from '.';
import { Image as ImageDefinition } from '.';
import { View, CSSType } from '../core/view';
import { booleanConverter } from '../core/view-base';
import { Enums } from '../enums';
import { ImageAsset } from '../../image-asset';
import { ImageSource } from '../../image-source';
import { isDataURI, isFontIconURI, isFileOrResourcePath, RESOURCE_PREFIX } from '../../utils';
import { Color } from '../../color';
import { Style } from '../styling/style';
import { Length } from '../styling/style-properties';
import { Length, LengthType } from '../styling/style-properties';
import { Property, InheritedCssProperty } from '../core/properties';
import { Trace } from '../../trace';
@@ -15,10 +16,10 @@ export abstract class ImageBase extends View implements ImageDefinition {
public imageSource: ImageSource;
public src: string | ImageSource;
public isLoading: boolean;
public stretch: Stretch;
public stretch: Enums.ImageStretchType;
public loadMode: 'sync' | 'async';
public decodeWidth: Length;
public decodeHeight: Length;
public decodeWidth: LengthType;
public decodeHeight: LengthType;
get tintColor(): Color {
return this.style.tintColor;
@@ -143,7 +144,7 @@ export const isLoadingProperty = new Property<ImageBase, boolean>({
});
isLoadingProperty.register(ImageBase);
export const stretchProperty = new Property<ImageBase, Stretch>({
export const stretchProperty = new Property<ImageBase, Enums.ImageStretchType>({
name: 'stretch',
defaultValue: 'aspectFit',
affectsLayout: global.isIOS,
@@ -158,14 +159,14 @@ export const tintColorProperty = new InheritedCssProperty<Style, Color>({
});
tintColorProperty.register(Style);
export const decodeHeightProperty = new Property<ImageBase, Length>({
export const decodeHeightProperty = new Property<ImageBase, LengthType>({
name: 'decodeHeight',
defaultValue: { value: 0, unit: 'dip' },
valueConverter: Length.parse,
});
decodeHeightProperty.register(ImageBase);
export const decodeWidthProperty = new Property<ImageBase, Length>({
export const decodeWidthProperty = new Property<ImageBase, LengthType>({
name: 'decodeWidth',
defaultValue: { value: 0, unit: 'dip' },
valueConverter: Length.parse,