chore: properly deprecate Enums before removing completely

This commit is contained in:
Nathan Walker
2021-03-25 22:25:19 -07:00
parent ccc7c59ac8
commit eb7c1c450a
3 changed files with 22 additions and 48 deletions

View File

@ -794,4 +794,13 @@ export type PercentLengthType = 'auto' | dip | LengthDipUnit | LengthPxUnit | Le
/**
* @deprecated Use `CoreTypes` instead. Enums will be removed in 9.0
*/
export const Enums: typeof CoreTypes;
export namespace Enums {
export type DeviceOrientationType = CoreTypes.DeviceOrientationType;
export type HorizontalAlignmentType = CoreTypes.HorizontalAlignmentType;
export type VerticalAlignmentTextType = CoreTypes.VerticalAlignmentTextType;
export type VerticalAlignmentType = CoreTypes.VerticalAlignmentType;
export type OrientationType = CoreTypes.OrientationType;
export type TextAlignmentType = CoreTypes.TextAlignmentType;
export type TextTransformType = CoreTypes.TextTransformType;
export type VisibilityType = CoreTypes.VisibilityType;
}

View File

@ -263,50 +263,6 @@ export namespace CoreTypes {
export const light = 'light';
export const dark = 'dark';
}
// Accuracy,
// AndroidActionBarIconVisibility,
// AndroidActionItemPosition,
// AnimationCurve,
// AutocapitalizationType,
// AutocapitalizationInputType: typeof AutocapitalizationType,
// BackgroundRepeat,
// BackgroundRepeatType: typeof BackgroundRepeat,
// DeviceOrientation,
// DeviceType,
// Dock,
// FontAttributes,
// FontStyle,
// FontStyleType: typeof FontStyle,
// FontWeight,
// FontWeightType: typeof FontWeight,
// HorizontalAlignment,
// HorizontalAlignmentType: typeof HorizontalAlignment,
// IOSActionItemPosition,
// ImageFormat,
// KeyboardType,
// KeyboardInputType: typeof KeyboardType,
// NavigationBarVisibility,
// Orientation,
// OrientationType: typeof Orientation,
// ReturnKeyType,
// StatusBarStyle,
// Stretch,
// SystemAppearance,
// TextAlignment,
// TextAlignmentType: typeof TextAlignment,
// TextDecoration,
// TextDecorationType: typeof TextDecoration,
// TextTransform,
// TextTransformType: typeof TextTransform,
// UpdateTextTrigger,
// UpdateTextTriggerType: typeof UpdateTextTrigger,
// VerticalAlignment,
// VerticalAlignmentType: typeof VerticalAlignment,
// Visibility,
// VisibilityType: typeof Visibility,
// WhiteSpace,
// WhiteSpaceType: typeof WhiteSpace
}
/**
@ -347,6 +303,15 @@ export type LengthType = 'auto' | dip | LengthDipUnit | LengthPxUnit;
export type PercentLengthType = 'auto' | dip | LengthDipUnit | LengthPxUnit | LengthPercentUnit;
/**
* @deprecated Use `CoreTypes` instead.
* @deprecated Use `CoreTypes` instead. Enums will be removed in 9.0
*/
export const Enums: typeof CoreTypes = CoreTypes;
export namespace Enums {
export type DeviceOrientationType = CoreTypes.DeviceOrientationType;
export type HorizontalAlignmentType = CoreTypes.HorizontalAlignmentType;
export type VerticalAlignmentTextType = CoreTypes.VerticalAlignmentTextType;
export type VerticalAlignmentType = CoreTypes.VerticalAlignmentType;
export type OrientationType = CoreTypes.OrientationType;
export type TextAlignmentType = CoreTypes.TextAlignmentType;
export type TextTransformType = CoreTypes.TextTransformType;
export type VisibilityType = CoreTypes.VisibilityType;
}

View File

@ -3,7 +3,7 @@
"main": "index",
"types": "index.d.ts",
"description": "NativeScript Core Modules",
"version": "8.0.0-alpha.5",
"version": "8.0.0-alpha.6",
"homepage": "https://nativescript.org",
"repository": {
"type": "git",