mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): type collisions with namespace (#8809)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Types
|
||||
import { View } from '../core/view';
|
||||
import { PercentLength } from '../styling/style-properties';
|
||||
import { PercentLengthType } from '../styling/style-properties';
|
||||
import { Color } from '../../color';
|
||||
|
||||
export type Transformation = {
|
||||
@@ -53,8 +53,8 @@ export interface AnimationDefinition {
|
||||
backgroundColor?: Color;
|
||||
translate?: Pair;
|
||||
scale?: Pair;
|
||||
height?: PercentLength | string;
|
||||
width?: PercentLength | string;
|
||||
height?: PercentLengthType | string;
|
||||
width?: PercentLengthType | string;
|
||||
rotate?: number;
|
||||
duration?: number;
|
||||
delay?: number;
|
||||
|
||||
6
packages/core/ui/animation/index.d.ts
vendored
6
packages/core/ui/animation/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { View } from '../core/view';
|
||||
import { Color } from '../../color';
|
||||
import { PercentLength } from '../styling/style-properties';
|
||||
import { PercentLengthType } from '../styling/style-properties';
|
||||
|
||||
export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
|
||||
|
||||
@@ -36,12 +36,12 @@ export interface AnimationDefinition {
|
||||
/**
|
||||
* Animates the height of a view.
|
||||
*/
|
||||
height?: PercentLength | string;
|
||||
height?: PercentLengthType | string;
|
||||
|
||||
/**
|
||||
* Animates the width of a view.
|
||||
*/
|
||||
width?: PercentLength | string;
|
||||
width?: PercentLengthType | string;
|
||||
|
||||
/**
|
||||
* Animates the rotate affine transform of the view. Value should be a number specifying the rotation amount in degrees.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { View } from '../core/view';
|
||||
import { Color } from '../../color';
|
||||
|
||||
import { AnimationCurve } from '../enums';
|
||||
import { Enums } from '../enums';
|
||||
|
||||
import { Trace } from '../../trace';
|
||||
|
||||
// Types.
|
||||
import { unsetValue } from '../core/properties';
|
||||
import { Animation } from '.';
|
||||
import { backgroundColorProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, rotateProperty, opacityProperty, rotateXProperty, rotateYProperty, widthProperty, heightProperty, PercentLength } from '../styling/style-properties';
|
||||
import { backgroundColorProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, rotateProperty, opacityProperty, rotateXProperty, rotateYProperty, widthProperty, heightProperty, PercentLength, PercentLengthType } from '../styling/style-properties';
|
||||
|
||||
export class Keyframes {
|
||||
name: string;
|
||||
@@ -28,7 +28,7 @@ export class KeyframeDeclaration {
|
||||
export class KeyframeInfo {
|
||||
public duration: number;
|
||||
public declarations: Array<KeyframeDeclaration>;
|
||||
public curve?: any = AnimationCurve.ease;
|
||||
public curve?: any = Enums.AnimationCurve.ease;
|
||||
}
|
||||
|
||||
export class KeyframeAnimationInfo {
|
||||
@@ -48,8 +48,8 @@ interface Keyframe {
|
||||
translate?: { x: number; y: number };
|
||||
rotate?: { x: number; y: number; z: number };
|
||||
opacity?: number;
|
||||
width?: PercentLength;
|
||||
height?: PercentLength;
|
||||
width?: PercentLengthType;
|
||||
height?: PercentLengthType;
|
||||
valueSource?: 'keyframe' | 'animation';
|
||||
duration?: number;
|
||||
curve?: any;
|
||||
|
||||
Reference in New Issue
Block a user