Skip to content

Commit 1c15ae9

Browse files
author
vakrilov
committed
chore: add missing d.ts files for public API
1 parent 879448e commit 1c15ae9

File tree

3 files changed

+34
-7
lines changed

3 files changed

+34
-7
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @module "ui/styling/converters"
3+
*/ /** */
4+
5+
import { AnimationCurve } from "../enums/enums";
6+
7+
export function timeConverter(value: string): number;
8+
export function animationTimingFunctionConverter(value: string): any;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @module "ui/styling/css-animations-parser"
3+
*/ /** */
4+
5+
import {
6+
KeyframeAnimationInfo,
7+
KeyframeDeclaration,
8+
KeyframeInfo,
9+
UnparsedKeyframe,
10+
} from "../animation/keyframe-animation";
11+
import { timeConverter, animationTimingFunctionConverter } from "./converters";
12+
13+
import { transformConverter } from "./style-properties";
14+
15+
export class CssAnimationParser {
16+
public static keyframeAnimationsFromCSSDeclarations(declarations: KeyframeDeclaration[]): KeyframeAnimationInfo[];
17+
18+
public static keyframesArrayFromCSS(keyframes: UnparsedKeyframe[]): KeyframeInfo[];
19+
}
20+
21+
export function parseKeyframeDeclarations(unparsedKeyframeDeclarations: KeyframeDeclaration[]) : KeyframeDeclaration[];

nativescript-core/ui/styling/css-animation-parser.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ const ANIMATION_PROPERTY_HANDLERS = Object.freeze({
2121
});
2222

2323
export class CssAnimationParser {
24-
public static keyframeAnimationsFromCSSDeclarations(
25-
declarations: Array<KeyframeDeclaration>)
26-
: Array<KeyframeAnimationInfo> {
24+
public static keyframeAnimationsFromCSSDeclarations(declarations: KeyframeDeclaration[])
25+
: KeyframeAnimationInfo[] {
2726

2827
if (declarations === null || declarations === undefined) {
2928
return undefined;
@@ -50,7 +49,7 @@ export class CssAnimationParser {
5049
return animations.length === 0 ? undefined : animations;
5150
}
5251

53-
public static keyframesArrayFromCSS(keyframes: Array<UnparsedKeyframe>): Array<KeyframeInfo> {
52+
public static keyframesArrayFromCSS(keyframes: UnparsedKeyframe[]): KeyframeInfo[] {
5453
let parsedKeyframes = new Array<KeyframeInfo>();
5554
for (let keyframe of keyframes) {
5655
let declarations = parseKeyframeDeclarations(keyframe.declarations);
@@ -92,7 +91,7 @@ export class CssAnimationParser {
9291
}
9392
}
9493

95-
function keyframeAnimationsFromCSSProperty(value: any, animations: Array<KeyframeAnimationInfo>) {
94+
function keyframeAnimationsFromCSSProperty(value: any, animations: KeyframeAnimationInfo[]) {
9695
if (typeof value === "string") {
9796
let values = value.split(/[,]+/);
9897
for (let parsedValue of values) {
@@ -128,8 +127,7 @@ function keyframeAnimationsFromCSSProperty(value: any, animations: Array<Keyfram
128127
}
129128
}
130129

131-
export function parseKeyframeDeclarations(unparsedKeyframeDeclarations: Array<KeyframeDeclaration>)
132-
: Array<KeyframeDeclaration> {
130+
export function parseKeyframeDeclarations(unparsedKeyframeDeclarations: KeyframeDeclaration[]): KeyframeDeclaration[] {
133131

134132
const declarations = unparsedKeyframeDeclarations
135133
.reduce((declarations, { property: unparsedProperty, value: unparsedValue }) => {

0 commit comments

Comments
 (0)