Skip to content

Commit a68798d

Browse files
committed
fix: property methods return type
1 parent 7e45b6e commit a68798d

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/index.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ export class Property<PropertyValueType extends Value> {
248248
* `"continue"`: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
249249
* @param numKeyframes determines what segment is looped: The segment looped is the portion of the layer from the first keyframe to the numKeyframes+1 keyframe. The default value of 0 means that all keyframes loop
250250
*/
251-
loopIn(type: loopType = "cycle", numKeyframes: number = 0): Value {
251+
loopIn(
252+
type: loopType = "cycle",
253+
numKeyframes: number = 0
254+
): PropertyValueType {
252255
return this.value;
253256
}
254257
/**
@@ -259,7 +262,10 @@ export class Property<PropertyValueType extends Value> {
259262
* `"continue"`: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
260263
* @param numKeyframes determines what segment is looped: The segment looped is the portion of the layer from the last keyframe to the `thisProperty.numKeys - numKeyframes` keyframe. The default value of 0 means that all keyframes loop
261264
*/
262-
loopOut(type: loopType = "cycle", numKeyframes: number = 0): Value {
265+
loopOut(
266+
type: loopType = "cycle",
267+
numKeyframes: number = 0
268+
): PropertyValueType {
263269
return this.value;
264270
}
265271
/**
@@ -270,7 +276,10 @@ export class Property<PropertyValueType extends Value> {
270276
* `"continue"`: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
271277
* @param duration The number of composition seconds in a segment to loop; the specified range is measured from the first keyframe
272278
*/
273-
loopInDuration(type: loopType = "cycle", duration: number = 0): Value {
279+
loopInDuration(
280+
type: loopType = "cycle",
281+
duration: number = 0
282+
): PropertyValueType {
274283
return this.value;
275284
}
276285
/**
@@ -281,7 +290,10 @@ export class Property<PropertyValueType extends Value> {
281290
* `"continue"`: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
282291
* @param duration The number of composition seconds in a segment to loop; the specified range is measured from the last keyframe backwards.
283292
*/
284-
loopOutDuration(type: loopType = "cycle", duration: number = 0): Value {
293+
loopOutDuration(
294+
type: loopType = "cycle",
295+
duration: number = 0
296+
): PropertyValueType {
285297
return this.value;
286298
}
287299
/**
@@ -345,7 +357,7 @@ export class Property<PropertyValueType extends Value> {
345357
octaves: number = 1,
346358
amp_mult: number = 0.5,
347359
time: number = thisLayer.time
348-
): Value {
360+
): PropertyValueType {
349361
return this.value;
350362
}
351363
/**
@@ -357,7 +369,7 @@ export class Property<PropertyValueType extends Value> {
357369
width: number = 0.2,
358370
samples: number = 5,
359371
time: number = thisLayer.time
360-
): Value {
372+
): PropertyValueType {
361373
return this.value;
362374
}
363375

0 commit comments

Comments
 (0)