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,17 +1,18 @@
import { ScrollView as ScrollViewDefinition, Orientation, ScrollEventData } from '.';
import { ScrollView as ScrollViewDefinition, ScrollEventData } from '.';
import { ContentView } from '../content-view';
import { profile } from '../../profiling';
import { Property, makeParser, makeValidator } from '../core/properties';
import { CSSType } from '../core/view';
import { booleanConverter } from '../core/view-base';
import { EventData } from '../../data/observable';
import { Enums } from '../enums';
@CSSType('ScrollView')
export abstract class ScrollViewBase extends ContentView implements ScrollViewDefinition {
private _scrollChangeCount = 0;
public static scrollEvent = 'scroll';
public orientation: Orientation;
public orientation: Enums.OrientationType;
public scrollBarIndicatorVisible: boolean;
public isScrollEnabled: boolean;
@@ -91,12 +92,12 @@ export interface ScrollViewBase {
on(event: 'scroll', callback: (args: ScrollEventData) => void, thisArg?: any);
}
const converter = makeParser<Orientation>(makeValidator('horizontal', 'vertical'));
export const orientationProperty = new Property<ScrollViewBase, Orientation>({
const converter = makeParser<Enums.OrientationType>(makeValidator(Enums.Orientation.horizontal, Enums.Orientation.vertical));
export const orientationProperty = new Property<ScrollViewBase, Enums.OrientationType>({
name: 'orientation',
defaultValue: 'vertical',
defaultValue: Enums.Orientation.vertical,
affectsLayout: true,
valueChanged: (target: ScrollViewBase, oldValue: Orientation, newValue: Orientation) => {
valueChanged: (target: ScrollViewBase, oldValue: Enums.OrientationType, newValue: Enums.OrientationType) => {
target._onOrientationChanged();
},
valueConverter: converter,