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,6 +1,7 @@
import { TextFieldBase, secureProperty } from './text-field-common';
import { whiteSpaceProperty, WhiteSpace } from '../text-base';
import { whiteSpaceProperty } from '../text-base';
import { keyboardTypeProperty } from '../editable-text-base';
import { Enums } from '../enums';
export * from './text-field-common';
@@ -96,10 +97,10 @@ export class TextField extends TextFieldBase {
this._setInputType(inputType);
}
[whiteSpaceProperty.getDefault](): WhiteSpace {
[whiteSpaceProperty.getDefault](): Enums.WhiteSpaceType {
return 'nowrap';
}
[whiteSpaceProperty.setNative](value: WhiteSpace) {
[whiteSpaceProperty.setNative](value: Enums.WhiteSpaceType) {
// Don't change it otherwise TextField will go to multiline mode.
}
}

View File

@@ -2,13 +2,13 @@ import { TextFieldBase, secureProperty } from './text-field-common';
import { textProperty } from '../text-base';
import { hintProperty, placeholderColorProperty, _updateCharactersInRangeReplacementString } from '../editable-text-base';
import { Color } from '../../color';
import { colorProperty, Length, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty } from '../styling/style-properties';
import { colorProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty, LengthType } from '../styling/style-properties';
import { layout } from '../../utils';
import { profile } from '../../profiling';
export * from './text-field-common';
const zeroLength: Length = {
const zeroLength: LengthType = {
value: 0,
unit: 'px',
};
@@ -284,31 +284,31 @@ export class TextField extends TextFieldBase {
this.nativeTextViewProtected.attributedPlaceholder = attributedPlaceholder;
}
[paddingTopProperty.getDefault](): Length {
[paddingTopProperty.getDefault](): LengthType {
return zeroLength;
}
[paddingTopProperty.setNative](value: Length) {
[paddingTopProperty.setNative](value: LengthType) {
// Padding is realized via UITextFieldImpl.textRectForBounds method
}
[paddingRightProperty.getDefault](): Length {
[paddingRightProperty.getDefault](): LengthType {
return zeroLength;
}
[paddingRightProperty.setNative](value: Length) {
[paddingRightProperty.setNative](value: LengthType) {
// Padding is realized via UITextFieldImpl.textRectForBounds method
}
[paddingBottomProperty.getDefault](): Length {
[paddingBottomProperty.getDefault](): LengthType {
return zeroLength;
}
[paddingBottomProperty.setNative](value: Length) {
[paddingBottomProperty.setNative](value: LengthType) {
// Padding is realized via UITextFieldImpl.textRectForBounds method
}
[paddingLeftProperty.getDefault](): Length {
[paddingLeftProperty.getDefault](): LengthType {
return zeroLength;
}
[paddingLeftProperty.setNative](value: Length) {
[paddingLeftProperty.setNative](value: LengthType) {
// Padding is realized via UITextFieldImpl.textRectForBounds method
}
}