Skip to content

Commit f79425f

Browse files
committed
update types (make time optional)
1 parent 62ad48d commit f79425f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
type keyVal = number | number[];
1+
import { Layer, Vector } from 'expression-globals-typescript';
2+
3+
const thisLayer = new Layer();
4+
5+
type keyVal = number | Vector;
26

37
interface inputKey {
48
keyTime: number;
@@ -18,7 +22,10 @@ interface eKey extends inputKey {
1822

1923
// The function that's called from After Effects
2024
// as eKeys.animate()
21-
function animate(inputKeyframes: inputKey[], inputTime: number) {
25+
function animate(
26+
inputKeyframes: inputKey[],
27+
inputTime: number = thisLayer.time
28+
) {
2229
// Validate function inputs
2330
checkTypes([
2431
['.animate() input keyframes', inputKeyframes, 'array'],

0 commit comments

Comments
 (0)